logster 1.2.11 → 1.3.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +18 -17
- data/.travis.yml +15 -16
- data/CHANGELOG.md +130 -130
- data/Gemfile +4 -4
- data/Guardfile +8 -8
- data/LICENSE.txt +22 -22
- data/README.md +99 -96
- data/Rakefile +24 -23
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +639 -639
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/images/Icon-144_rounded.png +0 -0
- data/assets/images/Icon-144_square.png +0 -0
- data/assets/images/icon_144x144.png +0 -0
- data/assets/images/icon_64x64.png +0 -0
- data/assets/javascript/client-app.js +81 -0
- data/assets/javascript/vendor.js +5302 -0
- data/assets/stylesheets/client-app.css +1 -0
- data/assets/stylesheets/vendor.css +4 -0
- data/build_client_app.sh +12 -0
- data/client-app/.editorconfig +20 -0
- data/client-app/.ember-cli +9 -0
- data/client-app/.eslintignore +19 -0
- data/client-app/.eslintrc.js +46 -0
- data/client-app/.gitignore +23 -0
- data/client-app/.travis.yml +27 -0
- data/client-app/.watchmanconfig +3 -0
- data/client-app/README.md +57 -0
- data/client-app/app/app.js +14 -0
- data/client-app/app/components/message-info.js +18 -0
- data/client-app/app/components/message-row.js +45 -0
- data/client-app/app/components/panel-resizer.js +75 -0
- data/client-app/app/components/tab-contents.js +27 -0
- data/client-app/app/components/tab-link.js +5 -0
- data/client-app/app/components/tabbed-section.js +32 -0
- data/client-app/app/components/time-formatter.js +25 -0
- data/client-app/app/components/update-time.js +21 -0
- data/client-app/app/controllers/index.js +83 -0
- data/client-app/app/controllers/show.js +13 -0
- data/client-app/app/index.html +29 -0
- data/client-app/app/initializers/app-init.js +55 -0
- data/client-app/app/lib/preload.js +14 -0
- data/client-app/app/lib/utilities.js +140 -0
- data/client-app/app/models/message-collection.js +158 -0
- data/client-app/app/models/message.js +99 -0
- data/client-app/app/resolver.js +3 -0
- data/client-app/app/router.js +14 -0
- data/client-app/app/routes/index.js +53 -0
- data/client-app/app/routes/show.js +14 -0
- data/{assets/stylesheets → client-app/app/styles}/app.css +387 -390
- data/{assets/javascript → client-app/app}/templates/application.hbs +2 -2
- data/client-app/app/templates/components/message-info.hbs +44 -0
- data/{assets/javascript → client-app/app/templates}/components/message-row.hbs +17 -17
- data/client-app/app/templates/components/tabbed-section.hbs +10 -0
- data/client-app/app/templates/components/time-formatter.hbs +1 -0
- data/{assets/javascript → client-app/app}/templates/index.hbs +57 -57
- data/{assets/javascript → client-app/app}/templates/show.hbs +4 -4
- data/client-app/config/environment.js +51 -0
- data/client-app/config/optional-features.json +3 -0
- data/client-app/config/targets.js +18 -0
- data/client-app/ember-cli-build.js +29 -0
- data/client-app/package-lock.json +11365 -0
- data/client-app/package.json +56 -0
- data/client-app/testem.js +25 -0
- data/client-app/tests/index.html +34 -0
- data/client-app/tests/integration/components/message-info-test.js +26 -0
- data/client-app/tests/integration/components/message-row-test.js +26 -0
- data/client-app/tests/integration/components/panel-resizer-test.js +26 -0
- data/client-app/tests/integration/components/tab-contents-test.js +26 -0
- data/client-app/tests/integration/components/tab-link-test.js +26 -0
- data/client-app/tests/integration/components/tabbed-section-test.js +26 -0
- data/client-app/tests/integration/components/time-formatter-test.js +26 -0
- data/client-app/tests/integration/components/update-time-test.js +26 -0
- data/client-app/tests/test-helper.js +8 -0
- data/client-app/tests/unit/controllers/index-test.js +12 -0
- data/client-app/tests/unit/controllers/show-test.js +12 -0
- data/client-app/tests/unit/initializers/app-init-test.js +31 -0
- data/client-app/tests/unit/routes/index-test.js +11 -0
- data/client-app/tests/unit/routes/show-test.js +11 -0
- data/lib/examples/sidekiq_logster_reporter.rb +21 -21
- data/lib/logster.rb +54 -54
- data/lib/logster/base_store.rb +130 -130
- data/lib/logster/configuration.rb +25 -25
- data/lib/logster/ignore_pattern.rb +65 -65
- data/lib/logster/logger.rb +102 -101
- data/lib/logster/message.rb +227 -226
- data/lib/logster/middleware/debug_exceptions.rb +26 -26
- data/lib/logster/middleware/reporter.rb +56 -54
- data/lib/logster/middleware/viewer.rb +220 -251
- data/lib/logster/rails/railtie.rb +58 -58
- data/lib/logster/redis_store.rb +481 -477
- data/lib/logster/version.rb +3 -3
- data/lib/logster/web.rb +14 -14
- data/logster.gemspec +34 -33
- data/test/examples/test_sidekiq_reporter_example.rb +46 -46
- data/test/fake_data/Gemfile +4 -4
- data/test/fake_data/generate.rb +10 -10
- data/test/logster/middleware/test_reporter.rb +21 -21
- data/test/logster/middleware/test_viewer.rb +96 -70
- data/test/logster/test_base_store.rb +147 -147
- data/test/logster/test_ignore_pattern.rb +41 -41
- data/test/logster/test_logger.rb +74 -74
- data/test/logster/test_message.rb +34 -34
- data/test/logster/test_redis_rate_limiter.rb +230 -230
- data/test/logster/test_redis_store.rb +427 -414
- data/test/test_helper.rb +38 -37
- data/vendor/assets/javascripts/logster.js.erb +39 -39
- metadata +83 -24
- data/assets/javascript/app.js +0 -817
- data/assets/javascript/components/message-info.hbs +0 -47
- data/assets/javascript/components/panel-resizer.hbs +0 -0
- data/assets/javascript/components/tab-contents.hbs +0 -1
- data/assets/javascript/components/tab-link.hbs +0 -1
- data/assets/javascript/components/tabbed-section.hbs +0 -6
- data/assets/javascript/external/ember-template-compiler.js +0 -22346
- data/assets/javascript/external/ember.js +0 -58500
- data/assets/javascript/external/ember.min.js +0 -17
- data/assets/javascript/external/jquery.min.js +0 -5
- data/assets/javascript/external/lodash.min.js +0 -87
- data/assets/javascript/external/moment.min.js +0 -6
- data/assets/stylesheets/font-awesome.min.css +0 -4
- data/bower.json +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec26ef0a62e49d2d336f01c7261c4d9077632a02115aef05526bd587ee8566a7
|
4
|
+
data.tar.gz: dd6193218e1f8310e21428d7a5fcc492ad4a0aa8b6a4c25ecea89aa4c62c3174
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32ae76456d4ba472990928a9642f233d55e27ed2529219cd638e475573ab3b746726710c75ff6a31c96027541afb4db3da6478a45cd1e5860d9364db025d5787
|
7
|
+
data.tar.gz: c24de8ed4bd6ffb073b0b47f804b9716407faefbdb52b6e4d8130f3db4ac787501237b8f304f105b24148579b269ff3a5345c55474d04db38e30194a27a35df0
|
data/.gitignore
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
.bundle
|
4
|
-
.config
|
5
|
-
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
|
-
_yardoc
|
9
|
-
coverage
|
10
|
-
doc/
|
11
|
-
lib/bundler/man
|
12
|
-
pkg
|
13
|
-
rdoc
|
14
|
-
spec/reports
|
15
|
-
test/tmp
|
16
|
-
test/version_tmp
|
17
|
-
tmp
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
.byebug_history
|
data/.travis.yml
CHANGED
@@ -1,16 +1,15 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
matrix:
|
4
|
-
fast_finish: true
|
5
|
-
|
6
|
-
rvm:
|
7
|
-
- 2.
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
sudo: false
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
matrix:
|
4
|
+
fast_finish: true
|
5
|
+
|
6
|
+
rvm:
|
7
|
+
- 2.3.4
|
8
|
+
|
9
|
+
services:
|
10
|
+
- redis-server
|
11
|
+
|
12
|
+
before_install:
|
13
|
+
- gem install bundler
|
14
|
+
|
15
|
+
sudo: false
|
data/CHANGELOG.md
CHANGED
@@ -1,130 +1,130 @@
|
|
1
|
-
# CHANGELOG
|
2
|
-
|
3
|
-
- 2018-08-13: Version 1.2.10
|
4
|
-
- Feature: expose chained loggers in Logster::Logger
|
5
|
-
|
6
|
-
- 2017-10-27: Version 1.2.8
|
7
|
-
- Fix: `Logster::Middleware::DebugExceptions` is passed a request in Rails 5 instead of the env.
|
8
|
-
|
9
|
-
- 2017-01-30: Version 1.2.7
|
10
|
-
- Feature: Add override_level to Logster::Logger allowing for threadsafe logger override
|
11
|
-
|
12
|
-
- 2016-10-24: Version 1.2.6
|
13
|
-
- Fix: Check if `Rails.env` is defined when using Logster in a none Rails project.
|
14
|
-
|
15
|
-
- 2016-07-11: Version 1.2.5
|
16
|
-
- Fix: Chained `Logster::Logger` logger now receives backtrace as well.
|
17
|
-
|
18
|
-
- 2016-05-05: Version 1.2.4
|
19
|
-
- Fix: XSS in log message show if attacker can inject script into ENV
|
20
|
-
|
21
|
-
- 2016-05-05: Version 1.2.3
|
22
|
-
- Fix: clear_all now also clears rate limits
|
23
|
-
- Fix: protect against corrupt data in redis during clear
|
24
|
-
|
25
|
-
- 2016-03-22: Version 1.2.2
|
26
|
-
- Fix: Conflicting attributes and method name for `Logster::RedisStore#rate_limits`.
|
27
|
-
- Fix: Rate limit checker was tracking limits too early. It should only track when a message has been bumped or saved.
|
28
|
-
|
29
|
-
- 2016-03-22: Version 1.2.1
|
30
|
-
- Feature: Add method to retrieve current rate from rate limiters.
|
31
|
-
- Feature: Make `RedisStore#rate_limits` readable.
|
32
|
-
- Feature: Make `RedisRateLimiter#callback` and `RedisRateLimiter#duration` readable.
|
33
|
-
|
34
|
-
- 2016-03-18: Version 1.2.0
|
35
|
-
- Fix: Move Redis configuration into RedisStore.
|
36
|
-
- Feature: Allow `RedisStore#redis_prefix` to either be a String or a Proc.
|
37
|
-
|
38
|
-
- 2016-02-11: Version 1.1.1
|
39
|
-
- Feature: Error rate can now be tracked in one minute and one hour buckets.
|
40
|
-
|
41
|
-
- 2015-11-27: Version 1.0.1
|
42
|
-
- New assets and logster logo
|
43
|
-
- Added favicon
|
44
|
-
- Added title
|
45
|
-
- Use rails logger instead of invoking store
|
46
|
-
|
47
|
-
- 2015-08-18: Version 0.9.9
|
48
|
-
- This marks the largest release of Logster to date, it has been in production use for quite a while, hence the version bump.
|
49
|
-
- Feature: automatically group errors in production mode, can be manually controlled via Logster.config.allow_grouping
|
50
|
-
- Feature: automatically track application version, can be manually controlled via Logster.config.application_version
|
51
|
-
- Feature: Font Awesome icons used throughout
|
52
|
-
- Feature: Ember upgrade to 1.13
|
53
|
-
- Feature: you can now "solve" a class of errors, if error has an application_version and backtrace. Once an error is solved it will no longer be reported for the "solved" application_versions
|
54
|
-
- Feature: allow users to delete a single error
|
55
|
-
- UX: use table for env
|
56
|
-
- Feature: display "protected" state of message in list
|
57
|
-
- Feature: use local times as opposed to relative times in time column
|
58
|
-
- UX: use Google Roboto font as opposed to system fonts
|
59
|
-
- UX: remove pointless titles from log table
|
60
|
-
- Feature: If Logster is in a background tab only poll once every 60 seconds (as opposed to 3)
|
61
|
-
- Fix: protect/unprotect redirected to show page
|
62
|
-
|
63
|
-
- 2015-06-16: Version 0.8.3
|
64
|
-
- Chained loggers now respect chain ignore
|
65
|
-
- Add hostname and process_id to env on all messages
|
66
|
-
|
67
|
-
- 2015-06-10: Version 0.8.2
|
68
|
-
- Add hostname and process_id to env on all messages
|
69
|
-
|
70
|
-
- 2015-05-01: Version 0.8.1
|
71
|
-
- Don't crash out logging routine if redis is down or stderr is closed
|
72
|
-
|
73
|
-
- 2015-04-16: Version 0.8.0
|
74
|
-
- Improve formatting of /show page
|
75
|
-
- Big version bump cause it is quite stable
|
76
|
-
|
77
|
-
- 2015-02-27: Version 0.1.7
|
78
|
-
- Fix invalid request on ?test
|
79
|
-
|
80
|
-
- 2014-08-05: Version 0.1.3
|
81
|
-
- Automatically include ignore filter
|
82
|
-
|
83
|
-
- 2014-08-13: Version 0.1.6
|
84
|
-
- Simplify install process
|
85
|
-
- Fix crash on 404 in /logs dir
|
86
|
-
|
87
|
-
- 2014-08-10: Version 0.1.5
|
88
|
-
- Fix crash in Rails 3
|
89
|
-
|
90
|
-
- 2014-08-08: Version 0.1.4
|
91
|
-
- Fix crash in ignore filter
|
92
|
-
|
93
|
-
- 2014-07-17: Version 0.1.1
|
94
|
-
- Refactored report method into base_store.rb - will be easier to make a new log store
|
95
|
-
- Add link in UI to clear all (non-protected) logs
|
96
|
-
- Add example of submitting logs from Sidekiq jobs
|
97
|
-
- Show Protect/Share links on all tabs
|
98
|
-
- Render hashes provided via Logster.add_to_env
|
99
|
-
|
100
|
-
- 2014-07-04: Version 0.0.12
|
101
|
-
- Feature: Able to share logs, at /logs/show/(hexdigits)
|
102
|
-
- Add protecting logs, so they aren't deleted when old (for use with sharing)
|
103
|
-
- Restructured Redis data model
|
104
|
-
|
105
|
-
- 2014-05-24: Version 0.0.10
|
106
|
-
- Correct context for error reporting
|
107
|
-
- Clean up backtraces of reported exceptions
|
108
|
-
|
109
|
-
- 2014-05-13: Version 0.0.9
|
110
|
-
- Stray debugger message removed, add window.location logging to js
|
111
|
-
|
112
|
-
- 2014-05-13: Version 0.0.8
|
113
|
-
- Fix pacakging binstubs by mistake
|
114
|
-
|
115
|
-
- 2014-05-13: Version 0.0.7
|
116
|
-
- Add support for javascript exception logging
|
117
|
-
|
118
|
-
- 2014-05-12: Version 0.0.6
|
119
|
-
- Add referer to env
|
120
|
-
|
121
|
-
- 2014-05-12: Version 0.0.5
|
122
|
-
- Feature: We now log basic rack environment with the messages
|
123
|
-
- Add your own with Logster.add_to_env(env, key, value)
|
124
|
-
|
125
|
-
- 2014-05-07: Version 0.0.4
|
126
|
-
- Feature: Ability to ignore patterns with Logster.store.ignore = [/regex/]
|
127
|
-
- Feature: Store backtraces, allow people to view them in the GUI
|
128
|
-
|
129
|
-
- 2014-05-07: Started changelog :)
|
130
|
-
- Report params in env tab
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
- 2018-08-13: Version 1.2.10
|
4
|
+
- Feature: expose chained loggers in Logster::Logger
|
5
|
+
|
6
|
+
- 2017-10-27: Version 1.2.8
|
7
|
+
- Fix: `Logster::Middleware::DebugExceptions` is passed a request in Rails 5 instead of the env.
|
8
|
+
|
9
|
+
- 2017-01-30: Version 1.2.7
|
10
|
+
- Feature: Add override_level to Logster::Logger allowing for threadsafe logger override
|
11
|
+
|
12
|
+
- 2016-10-24: Version 1.2.6
|
13
|
+
- Fix: Check if `Rails.env` is defined when using Logster in a none Rails project.
|
14
|
+
|
15
|
+
- 2016-07-11: Version 1.2.5
|
16
|
+
- Fix: Chained `Logster::Logger` logger now receives backtrace as well.
|
17
|
+
|
18
|
+
- 2016-05-05: Version 1.2.4
|
19
|
+
- Fix: XSS in log message show if attacker can inject script into ENV
|
20
|
+
|
21
|
+
- 2016-05-05: Version 1.2.3
|
22
|
+
- Fix: clear_all now also clears rate limits
|
23
|
+
- Fix: protect against corrupt data in redis during clear
|
24
|
+
|
25
|
+
- 2016-03-22: Version 1.2.2
|
26
|
+
- Fix: Conflicting attributes and method name for `Logster::RedisStore#rate_limits`.
|
27
|
+
- Fix: Rate limit checker was tracking limits too early. It should only track when a message has been bumped or saved.
|
28
|
+
|
29
|
+
- 2016-03-22: Version 1.2.1
|
30
|
+
- Feature: Add method to retrieve current rate from rate limiters.
|
31
|
+
- Feature: Make `RedisStore#rate_limits` readable.
|
32
|
+
- Feature: Make `RedisRateLimiter#callback` and `RedisRateLimiter#duration` readable.
|
33
|
+
|
34
|
+
- 2016-03-18: Version 1.2.0
|
35
|
+
- Fix: Move Redis configuration into RedisStore.
|
36
|
+
- Feature: Allow `RedisStore#redis_prefix` to either be a String or a Proc.
|
37
|
+
|
38
|
+
- 2016-02-11: Version 1.1.1
|
39
|
+
- Feature: Error rate can now be tracked in one minute and one hour buckets.
|
40
|
+
|
41
|
+
- 2015-11-27: Version 1.0.1
|
42
|
+
- New assets and logster logo
|
43
|
+
- Added favicon
|
44
|
+
- Added title
|
45
|
+
- Use rails logger instead of invoking store
|
46
|
+
|
47
|
+
- 2015-08-18: Version 0.9.9
|
48
|
+
- This marks the largest release of Logster to date, it has been in production use for quite a while, hence the version bump.
|
49
|
+
- Feature: automatically group errors in production mode, can be manually controlled via Logster.config.allow_grouping
|
50
|
+
- Feature: automatically track application version, can be manually controlled via Logster.config.application_version
|
51
|
+
- Feature: Font Awesome icons used throughout
|
52
|
+
- Feature: Ember upgrade to 1.13
|
53
|
+
- Feature: you can now "solve" a class of errors, if error has an application_version and backtrace. Once an error is solved it will no longer be reported for the "solved" application_versions
|
54
|
+
- Feature: allow users to delete a single error
|
55
|
+
- UX: use table for env
|
56
|
+
- Feature: display "protected" state of message in list
|
57
|
+
- Feature: use local times as opposed to relative times in time column
|
58
|
+
- UX: use Google Roboto font as opposed to system fonts
|
59
|
+
- UX: remove pointless titles from log table
|
60
|
+
- Feature: If Logster is in a background tab only poll once every 60 seconds (as opposed to 3)
|
61
|
+
- Fix: protect/unprotect redirected to show page
|
62
|
+
|
63
|
+
- 2015-06-16: Version 0.8.3
|
64
|
+
- Chained loggers now respect chain ignore
|
65
|
+
- Add hostname and process_id to env on all messages
|
66
|
+
|
67
|
+
- 2015-06-10: Version 0.8.2
|
68
|
+
- Add hostname and process_id to env on all messages
|
69
|
+
|
70
|
+
- 2015-05-01: Version 0.8.1
|
71
|
+
- Don't crash out logging routine if redis is down or stderr is closed
|
72
|
+
|
73
|
+
- 2015-04-16: Version 0.8.0
|
74
|
+
- Improve formatting of /show page
|
75
|
+
- Big version bump cause it is quite stable
|
76
|
+
|
77
|
+
- 2015-02-27: Version 0.1.7
|
78
|
+
- Fix invalid request on ?test
|
79
|
+
|
80
|
+
- 2014-08-05: Version 0.1.3
|
81
|
+
- Automatically include ignore filter
|
82
|
+
|
83
|
+
- 2014-08-13: Version 0.1.6
|
84
|
+
- Simplify install process
|
85
|
+
- Fix crash on 404 in /logs dir
|
86
|
+
|
87
|
+
- 2014-08-10: Version 0.1.5
|
88
|
+
- Fix crash in Rails 3
|
89
|
+
|
90
|
+
- 2014-08-08: Version 0.1.4
|
91
|
+
- Fix crash in ignore filter
|
92
|
+
|
93
|
+
- 2014-07-17: Version 0.1.1
|
94
|
+
- Refactored report method into base_store.rb - will be easier to make a new log store
|
95
|
+
- Add link in UI to clear all (non-protected) logs
|
96
|
+
- Add example of submitting logs from Sidekiq jobs
|
97
|
+
- Show Protect/Share links on all tabs
|
98
|
+
- Render hashes provided via Logster.add_to_env
|
99
|
+
|
100
|
+
- 2014-07-04: Version 0.0.12
|
101
|
+
- Feature: Able to share logs, at /logs/show/(hexdigits)
|
102
|
+
- Add protecting logs, so they aren't deleted when old (for use with sharing)
|
103
|
+
- Restructured Redis data model
|
104
|
+
|
105
|
+
- 2014-05-24: Version 0.0.10
|
106
|
+
- Correct context for error reporting
|
107
|
+
- Clean up backtraces of reported exceptions
|
108
|
+
|
109
|
+
- 2014-05-13: Version 0.0.9
|
110
|
+
- Stray debugger message removed, add window.location logging to js
|
111
|
+
|
112
|
+
- 2014-05-13: Version 0.0.8
|
113
|
+
- Fix pacakging binstubs by mistake
|
114
|
+
|
115
|
+
- 2014-05-13: Version 0.0.7
|
116
|
+
- Add support for javascript exception logging
|
117
|
+
|
118
|
+
- 2014-05-12: Version 0.0.6
|
119
|
+
- Add referer to env
|
120
|
+
|
121
|
+
- 2014-05-12: Version 0.0.5
|
122
|
+
- Feature: We now log basic rack environment with the messages
|
123
|
+
- Add your own with Logster.add_to_env(env, key, value)
|
124
|
+
|
125
|
+
- 2014-05-07: Version 0.0.4
|
126
|
+
- Feature: Ability to ignore patterns with Logster.store.ignore = [/regex/]
|
127
|
+
- Feature: Store backtraces, allow people to view them in the GUI
|
128
|
+
|
129
|
+
- 2014-05-07: Started changelog :)
|
130
|
+
- Report params in env tab
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in rack-log-viewer.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in rack-log-viewer.gemspec
|
4
|
+
gemspec
|
data/Guardfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
guard :minitest do
|
5
|
-
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
|
6
|
-
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
7
|
-
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
8
|
-
end
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :minitest do
|
5
|
+
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
|
6
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
7
|
+
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
8
|
+
end
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2014 Sam Saffron
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright (c) 2014 Sam Saffron
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,96 +1,99 @@
|
|
1
|
-
![logster logo](https://raw.githubusercontent.com/discourse/logster/master/website/images/logo-logster-cropped-small.png)
|
2
|
-
|
3
|
-
Logster is an embedded Ruby "exception reporting service" admins can view on live websites, at `http://example.com/logs`
|
4
|
-
|
5
|
-
## Interface
|
6
|
-
|
7
|
-
![Screenshot](https://raw.githubusercontent.com/discourse/logster/master/website/images/logster-screenshot.png)
|
8
|
-
|
9
|
-
Play with a live demo at [logster.info/logs](http://logster.info/logs).
|
10
|
-
|
11
|
-
## Installation
|
12
|
-
|
13
|
-
Add these lines to your application's Gemfile:
|
14
|
-
|
15
|
-
gem 'redis'
|
16
|
-
gem 'logster'
|
17
|
-
|
18
|
-
And then execute:
|
19
|
-
|
20
|
-
$ bundle
|
21
|
-
|
22
|
-
Make logster web available add the following to your `routes.rb`:
|
23
|
-
|
24
|
-
```
|
25
|
-
constraints lambda { |req| req.session["admin"] } do
|
26
|
-
mount Logster::Web => "/logs"
|
27
|
-
end
|
28
|
-
```
|
29
|
-
|
30
|
-
By default, logster will only run in development and production environments.
|
31
|
-
|
32
|
-
To run logster in other environments, in `config/application.rb`
|
33
|
-
|
34
|
-
```
|
35
|
-
Logster.set_environments([:development, :staging, :production])
|
36
|
-
```
|
37
|
-
|
38
|
-
### Tracking Error Rate
|
39
|
-
Logster allows you to register a callback when the rate of errors has exceeded
|
40
|
-
a given limit.
|
41
|
-
|
42
|
-
Tracking buckets available are one minute and an hour.
|
43
|
-
|
44
|
-
Example:
|
45
|
-
```
|
46
|
-
Logster.register_rate_limit_per_minute(Logger::WARN, 60) do |rate|
|
47
|
-
puts "O no! The error rate is now #{rate} errors/min"
|
48
|
-
end
|
49
|
-
|
50
|
-
Logster.register_rate_limit_per_hour([Logger::WARN, Logger::ERROR, Logger::FATAL], 60) do |rate|
|
51
|
-
puts "O no! The error rate is now #{rate} errors/hour"
|
52
|
-
end
|
53
|
-
```
|
54
|
-
|
55
|
-
### Note
|
56
|
-
If you are seeing the error `No such middleware to insert before: ActionDispatch::DebugExceptions` after installing logster,
|
57
|
-
then you are using a conflicting gem like `better_errors` or `web-console`.
|
58
|
-
|
59
|
-
To avoid this error, make sure logster is added behind those conflicting gems in your Gemfile.
|
60
|
-
|
61
|
-
### Mount using warden (devise)
|
62
|
-
```
|
63
|
-
admin_constraint = lambda do |request|
|
64
|
-
request.env['warden'].authenticate? and request.env['warden'].user.admin?
|
65
|
-
end
|
66
|
-
|
67
|
-
constraints admin_constraint do
|
68
|
-
mount Logster::Web, at: "/logs"
|
69
|
-
end
|
70
|
-
```
|
71
|
-
|
72
|
-
Out of the box, logster will use the default redis connection, to customise, in `config/application.rb`
|
73
|
-
|
74
|
-
```
|
75
|
-
Logster.store = Logster::RedisStore.new(redis_connection)
|
76
|
-
```
|
77
|
-
|
78
|
-
### Heroku Deployment
|
79
|
-
In case you may be using the `rails_12factor` gem in a production deployment on Heroku, the standard `Rails.logger` will not cooperate properly with Logster. Extend Rails.logger in your `config/application.rb` or `config/initializers/logster.rb` with:
|
80
|
-
```
|
81
|
-
if Rails.env.production?
|
82
|
-
Rails.logger.extend(ActiveSupport::Logger.broadcast(Logster.logger))
|
83
|
-
end
|
84
|
-
```
|
85
|
-
|
86
|
-
## Thanks
|
87
|
-
|
88
|
-
Logster UI is built using [Ember.js](http://emberjs.com/)
|
89
|
-
|
90
|
-
## Contributing
|
91
|
-
|
92
|
-
1. Fork it ( https://github.com/discourse/logster/fork )
|
93
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
94
|
-
3.
|
95
|
-
4.
|
96
|
-
5.
|
1
|
+
![logster logo](https://raw.githubusercontent.com/discourse/logster/master/website/images/logo-logster-cropped-small.png)
|
2
|
+
|
3
|
+
Logster is an embedded Ruby "exception reporting service" admins can view on live websites, at `http://example.com/logs`
|
4
|
+
|
5
|
+
## Interface
|
6
|
+
|
7
|
+
![Screenshot](https://raw.githubusercontent.com/discourse/logster/master/website/images/logster-screenshot.png)
|
8
|
+
|
9
|
+
Play with a live demo at [logster.info/logs](http://logster.info/logs).
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add these lines to your application's Gemfile:
|
14
|
+
|
15
|
+
gem 'redis'
|
16
|
+
gem 'logster'
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Make logster web available add the following to your `routes.rb`:
|
23
|
+
|
24
|
+
```
|
25
|
+
constraints lambda { |req| req.session["admin"] } do
|
26
|
+
mount Logster::Web => "/logs"
|
27
|
+
end
|
28
|
+
```
|
29
|
+
|
30
|
+
By default, logster will only run in development and production environments.
|
31
|
+
|
32
|
+
To run logster in other environments, in `config/application.rb`
|
33
|
+
|
34
|
+
```
|
35
|
+
Logster.set_environments([:development, :staging, :production])
|
36
|
+
```
|
37
|
+
|
38
|
+
### Tracking Error Rate
|
39
|
+
Logster allows you to register a callback when the rate of errors has exceeded
|
40
|
+
a given limit.
|
41
|
+
|
42
|
+
Tracking buckets available are one minute and an hour.
|
43
|
+
|
44
|
+
Example:
|
45
|
+
```
|
46
|
+
Logster.register_rate_limit_per_minute(Logger::WARN, 60) do |rate|
|
47
|
+
puts "O no! The error rate is now #{rate} errors/min"
|
48
|
+
end
|
49
|
+
|
50
|
+
Logster.register_rate_limit_per_hour([Logger::WARN, Logger::ERROR, Logger::FATAL], 60) do |rate|
|
51
|
+
puts "O no! The error rate is now #{rate} errors/hour"
|
52
|
+
end
|
53
|
+
```
|
54
|
+
|
55
|
+
### Note
|
56
|
+
If you are seeing the error `No such middleware to insert before: ActionDispatch::DebugExceptions` after installing logster,
|
57
|
+
then you are using a conflicting gem like `better_errors` or `web-console`.
|
58
|
+
|
59
|
+
To avoid this error, make sure logster is added behind those conflicting gems in your Gemfile.
|
60
|
+
|
61
|
+
### Mount using warden (devise)
|
62
|
+
```
|
63
|
+
admin_constraint = lambda do |request|
|
64
|
+
request.env['warden'].authenticate? and request.env['warden'].user.admin?
|
65
|
+
end
|
66
|
+
|
67
|
+
constraints admin_constraint do
|
68
|
+
mount Logster::Web, at: "/logs"
|
69
|
+
end
|
70
|
+
```
|
71
|
+
|
72
|
+
Out of the box, logster will use the default redis connection, to customise, in `config/application.rb`
|
73
|
+
|
74
|
+
```
|
75
|
+
Logster.store = Logster::RedisStore.new(redis_connection)
|
76
|
+
```
|
77
|
+
|
78
|
+
### Heroku Deployment
|
79
|
+
In case you may be using the `rails_12factor` gem in a production deployment on Heroku, the standard `Rails.logger` will not cooperate properly with Logster. Extend Rails.logger in your `config/application.rb` or `config/initializers/logster.rb` with:
|
80
|
+
```
|
81
|
+
if Rails.env.production?
|
82
|
+
Rails.logger.extend(ActiveSupport::Logger.broadcast(Logster.logger))
|
83
|
+
end
|
84
|
+
```
|
85
|
+
|
86
|
+
## Thanks
|
87
|
+
|
88
|
+
Logster UI is built using [Ember.js](http://emberjs.com/)
|
89
|
+
|
90
|
+
## Contributing
|
91
|
+
|
92
|
+
1. Fork it ( https://github.com/discourse/logster/fork )
|
93
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
94
|
+
3. Run `cd client-app && npm install`
|
95
|
+
4. Run `rake client_dev` to start Sinatra server (port 9292) and Ember server (port 4200). Use Ember server for hot reload for client code.
|
96
|
+
5. Once you're done making changes, run `./build_client_app.sh` to make and copy a production build to the assets folder. (Shutting down the rake task will do this step automatically for you)
|
97
|
+
6. Commit your changes (`git commit -am 'Add some feature'`)
|
98
|
+
7. Push to the branch (`git push origin my-new-feature`)
|
99
|
+
8. Create a new Pull Request
|