logster 1.2.11 → 1.3.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +18 -17
  3. data/.travis.yml +15 -16
  4. data/CHANGELOG.md +130 -130
  5. data/Gemfile +4 -4
  6. data/Guardfile +8 -8
  7. data/LICENSE.txt +22 -22
  8. data/README.md +99 -96
  9. data/Rakefile +24 -23
  10. data/assets/fonts/FontAwesome.otf +0 -0
  11. data/assets/fonts/fontawesome-webfont.eot +0 -0
  12. data/assets/fonts/fontawesome-webfont.svg +639 -639
  13. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  14. data/assets/fonts/fontawesome-webfont.woff +0 -0
  15. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  16. data/assets/images/Icon-144_rounded.png +0 -0
  17. data/assets/images/Icon-144_square.png +0 -0
  18. data/assets/images/icon_144x144.png +0 -0
  19. data/assets/images/icon_64x64.png +0 -0
  20. data/assets/javascript/client-app.js +81 -0
  21. data/assets/javascript/vendor.js +5302 -0
  22. data/assets/stylesheets/client-app.css +1 -0
  23. data/assets/stylesheets/vendor.css +4 -0
  24. data/build_client_app.sh +12 -0
  25. data/client-app/.editorconfig +20 -0
  26. data/client-app/.ember-cli +9 -0
  27. data/client-app/.eslintignore +19 -0
  28. data/client-app/.eslintrc.js +46 -0
  29. data/client-app/.gitignore +23 -0
  30. data/client-app/.travis.yml +27 -0
  31. data/client-app/.watchmanconfig +3 -0
  32. data/client-app/README.md +57 -0
  33. data/client-app/app/app.js +14 -0
  34. data/client-app/app/components/message-info.js +18 -0
  35. data/client-app/app/components/message-row.js +45 -0
  36. data/client-app/app/components/panel-resizer.js +75 -0
  37. data/client-app/app/components/tab-contents.js +27 -0
  38. data/client-app/app/components/tab-link.js +5 -0
  39. data/client-app/app/components/tabbed-section.js +32 -0
  40. data/client-app/app/components/time-formatter.js +25 -0
  41. data/client-app/app/components/update-time.js +21 -0
  42. data/client-app/app/controllers/index.js +83 -0
  43. data/client-app/app/controllers/show.js +13 -0
  44. data/client-app/app/index.html +29 -0
  45. data/client-app/app/initializers/app-init.js +55 -0
  46. data/client-app/app/lib/preload.js +14 -0
  47. data/client-app/app/lib/utilities.js +140 -0
  48. data/client-app/app/models/message-collection.js +158 -0
  49. data/client-app/app/models/message.js +99 -0
  50. data/client-app/app/resolver.js +3 -0
  51. data/client-app/app/router.js +14 -0
  52. data/client-app/app/routes/index.js +53 -0
  53. data/client-app/app/routes/show.js +14 -0
  54. data/{assets/stylesheets → client-app/app/styles}/app.css +387 -390
  55. data/{assets/javascript → client-app/app}/templates/application.hbs +2 -2
  56. data/client-app/app/templates/components/message-info.hbs +44 -0
  57. data/{assets/javascript → client-app/app/templates}/components/message-row.hbs +17 -17
  58. data/client-app/app/templates/components/tabbed-section.hbs +10 -0
  59. data/client-app/app/templates/components/time-formatter.hbs +1 -0
  60. data/{assets/javascript → client-app/app}/templates/index.hbs +57 -57
  61. data/{assets/javascript → client-app/app}/templates/show.hbs +4 -4
  62. data/client-app/config/environment.js +51 -0
  63. data/client-app/config/optional-features.json +3 -0
  64. data/client-app/config/targets.js +18 -0
  65. data/client-app/ember-cli-build.js +29 -0
  66. data/client-app/package-lock.json +11365 -0
  67. data/client-app/package.json +56 -0
  68. data/client-app/testem.js +25 -0
  69. data/client-app/tests/index.html +34 -0
  70. data/client-app/tests/integration/components/message-info-test.js +26 -0
  71. data/client-app/tests/integration/components/message-row-test.js +26 -0
  72. data/client-app/tests/integration/components/panel-resizer-test.js +26 -0
  73. data/client-app/tests/integration/components/tab-contents-test.js +26 -0
  74. data/client-app/tests/integration/components/tab-link-test.js +26 -0
  75. data/client-app/tests/integration/components/tabbed-section-test.js +26 -0
  76. data/client-app/tests/integration/components/time-formatter-test.js +26 -0
  77. data/client-app/tests/integration/components/update-time-test.js +26 -0
  78. data/client-app/tests/test-helper.js +8 -0
  79. data/client-app/tests/unit/controllers/index-test.js +12 -0
  80. data/client-app/tests/unit/controllers/show-test.js +12 -0
  81. data/client-app/tests/unit/initializers/app-init-test.js +31 -0
  82. data/client-app/tests/unit/routes/index-test.js +11 -0
  83. data/client-app/tests/unit/routes/show-test.js +11 -0
  84. data/lib/examples/sidekiq_logster_reporter.rb +21 -21
  85. data/lib/logster.rb +54 -54
  86. data/lib/logster/base_store.rb +130 -130
  87. data/lib/logster/configuration.rb +25 -25
  88. data/lib/logster/ignore_pattern.rb +65 -65
  89. data/lib/logster/logger.rb +102 -101
  90. data/lib/logster/message.rb +227 -226
  91. data/lib/logster/middleware/debug_exceptions.rb +26 -26
  92. data/lib/logster/middleware/reporter.rb +56 -54
  93. data/lib/logster/middleware/viewer.rb +220 -251
  94. data/lib/logster/rails/railtie.rb +58 -58
  95. data/lib/logster/redis_store.rb +481 -477
  96. data/lib/logster/version.rb +3 -3
  97. data/lib/logster/web.rb +14 -14
  98. data/logster.gemspec +34 -33
  99. data/test/examples/test_sidekiq_reporter_example.rb +46 -46
  100. data/test/fake_data/Gemfile +4 -4
  101. data/test/fake_data/generate.rb +10 -10
  102. data/test/logster/middleware/test_reporter.rb +21 -21
  103. data/test/logster/middleware/test_viewer.rb +96 -70
  104. data/test/logster/test_base_store.rb +147 -147
  105. data/test/logster/test_ignore_pattern.rb +41 -41
  106. data/test/logster/test_logger.rb +74 -74
  107. data/test/logster/test_message.rb +34 -34
  108. data/test/logster/test_redis_rate_limiter.rb +230 -230
  109. data/test/logster/test_redis_store.rb +427 -414
  110. data/test/test_helper.rb +38 -37
  111. data/vendor/assets/javascripts/logster.js.erb +39 -39
  112. metadata +83 -24
  113. data/assets/javascript/app.js +0 -817
  114. data/assets/javascript/components/message-info.hbs +0 -47
  115. data/assets/javascript/components/panel-resizer.hbs +0 -0
  116. data/assets/javascript/components/tab-contents.hbs +0 -1
  117. data/assets/javascript/components/tab-link.hbs +0 -1
  118. data/assets/javascript/components/tabbed-section.hbs +0 -6
  119. data/assets/javascript/external/ember-template-compiler.js +0 -22346
  120. data/assets/javascript/external/ember.js +0 -58500
  121. data/assets/javascript/external/ember.min.js +0 -17
  122. data/assets/javascript/external/jquery.min.js +0 -5
  123. data/assets/javascript/external/lodash.min.js +0 -87
  124. data/assets/javascript/external/moment.min.js +0 -6
  125. data/assets/stylesheets/font-awesome.min.css +0 -4
  126. data/bower.json +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed597682a7e55483d21496994dbd1e0b973d709942cdb3de18b1144ef0a3904b
4
- data.tar.gz: 1b055a33df989576943e11b3e766e8f1bf6b0a88173cfe5f0af0bb681a04e6f9
3
+ metadata.gz: ec26ef0a62e49d2d336f01c7261c4d9077632a02115aef05526bd587ee8566a7
4
+ data.tar.gz: dd6193218e1f8310e21428d7a5fcc492ad4a0aa8b6a4c25ecea89aa4c62c3174
5
5
  SHA512:
6
- metadata.gz: 12bd4cc121922e8f50d90a5a3446db4209413c07c2b0973781be27a0cd813214b28f25bb7a56ae8a9bfb05bd3e0ccf55c298ab960d177bcf08e76b8fc596bcac
7
- data.tar.gz: 065ca68acc662edbeac0209db3b6603deb2c105be48aa0a175ea9c1bd23527722bbe66c844f90db8a7eabb452c5ca7480799c0ddaad79cb37c8b525600be81d8
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
@@ -1,16 +1,15 @@
1
- language: ruby
2
-
3
- matrix:
4
- fast_finish: true
5
-
6
- rvm:
7
- - 2.2.8
8
- - 2.3.4
9
-
10
- services:
11
- - redis-server
12
-
13
- before_install:
14
- - gem install bundler
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
@@ -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
@@ -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. Commit your changes (`git commit -am 'Add some feature'`)
95
- 4. Push to the branch (`git push origin my-new-feature`)
96
- 5. Create a new Pull Request
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