logster 1.3.0 → 1.3.1

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 (112) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +18 -18
  3. data/.travis.yml +15 -15
  4. data/CHANGELOG.md +137 -130
  5. data/Gemfile +4 -4
  6. data/Guardfile +8 -8
  7. data/LICENSE.txt +22 -22
  8. data/README.md +99 -99
  9. data/Rakefile +24 -24
  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 -81
  21. data/assets/javascript/vendor.js +5302 -5302
  22. data/assets/stylesheets/client-app.css +0 -0
  23. data/assets/stylesheets/vendor.css +3 -3
  24. data/build_client_app.sh +12 -12
  25. data/client-app/.editorconfig +20 -20
  26. data/client-app/.ember-cli +9 -9
  27. data/client-app/.eslintignore +19 -19
  28. data/client-app/.eslintrc.js +46 -46
  29. data/client-app/.gitignore +23 -23
  30. data/client-app/.travis.yml +27 -27
  31. data/client-app/.watchmanconfig +3 -3
  32. data/client-app/README.md +57 -57
  33. data/client-app/app/app.js +14 -14
  34. data/client-app/app/components/message-info.js +18 -18
  35. data/client-app/app/components/message-row.js +45 -45
  36. data/client-app/app/components/panel-resizer.js +75 -75
  37. data/client-app/app/components/tab-contents.js +27 -27
  38. data/client-app/app/components/tab-link.js +5 -5
  39. data/client-app/app/components/tabbed-section.js +32 -32
  40. data/client-app/app/components/time-formatter.js +25 -25
  41. data/client-app/app/components/update-time.js +21 -21
  42. data/client-app/app/controllers/index.js +83 -83
  43. data/client-app/app/controllers/show.js +13 -13
  44. data/client-app/app/index.html +29 -29
  45. data/client-app/app/initializers/app-init.js +55 -55
  46. data/client-app/app/lib/preload.js +14 -14
  47. data/client-app/app/lib/utilities.js +140 -140
  48. data/client-app/app/models/message-collection.js +158 -158
  49. data/client-app/app/models/message.js +99 -99
  50. data/client-app/app/resolver.js +3 -3
  51. data/client-app/app/router.js +14 -14
  52. data/client-app/app/routes/index.js +53 -53
  53. data/client-app/app/routes/show.js +14 -14
  54. data/client-app/app/styles/app.css +387 -387
  55. data/client-app/app/templates/application.hbs +2 -2
  56. data/client-app/app/templates/components/message-info.hbs +44 -44
  57. data/client-app/app/templates/components/message-row.hbs +17 -17
  58. data/client-app/app/templates/components/tabbed-section.hbs +10 -10
  59. data/client-app/app/templates/components/time-formatter.hbs +1 -1
  60. data/client-app/app/templates/index.hbs +57 -57
  61. data/client-app/app/templates/show.hbs +4 -4
  62. data/client-app/config/environment.js +51 -51
  63. data/client-app/config/optional-features.json +3 -3
  64. data/client-app/config/targets.js +18 -18
  65. data/client-app/ember-cli-build.js +29 -29
  66. data/client-app/package-lock.json +11365 -11365
  67. data/client-app/package.json +56 -56
  68. data/client-app/testem.js +25 -25
  69. data/client-app/tests/index.html +34 -34
  70. data/client-app/tests/integration/components/message-info-test.js +26 -26
  71. data/client-app/tests/integration/components/message-row-test.js +26 -26
  72. data/client-app/tests/integration/components/panel-resizer-test.js +26 -26
  73. data/client-app/tests/integration/components/tab-contents-test.js +26 -26
  74. data/client-app/tests/integration/components/tab-link-test.js +26 -26
  75. data/client-app/tests/integration/components/tabbed-section-test.js +26 -26
  76. data/client-app/tests/integration/components/time-formatter-test.js +26 -26
  77. data/client-app/tests/integration/components/update-time-test.js +26 -26
  78. data/client-app/tests/test-helper.js +8 -8
  79. data/client-app/tests/unit/controllers/index-test.js +12 -12
  80. data/client-app/tests/unit/controllers/show-test.js +12 -12
  81. data/client-app/tests/unit/initializers/app-init-test.js +31 -31
  82. data/client-app/tests/unit/routes/index-test.js +11 -11
  83. data/client-app/tests/unit/routes/show-test.js +11 -11
  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 +108 -102
  90. data/lib/logster/message.rb +227 -227
  91. data/lib/logster/middleware/debug_exceptions.rb +26 -26
  92. data/lib/logster/middleware/reporter.rb +56 -56
  93. data/lib/logster/middleware/viewer.rb +220 -220
  94. data/lib/logster/rails/railtie.rb +58 -58
  95. data/lib/logster/redis_store.rb +481 -481
  96. data/lib/logster/version.rb +3 -3
  97. data/lib/logster/web.rb +14 -14
  98. data/logster.gemspec +34 -34
  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 -96
  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 +80 -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 -427
  110. data/test/test_helper.rb +38 -38
  111. data/vendor/assets/javascripts/logster.js.erb +39 -39
  112. metadata +3 -3
@@ -1,2 +1,2 @@
1
- {{update-time}}
2
- {{outlet}}
1
+ {{update-time}}
2
+ {{outlet}}
@@ -1,44 +1,44 @@
1
- <div class="message-info">
2
- {{#tabbed-section}}
3
- {{#tab-contents name="info" hint="show info" currentMessage=currentMessage}}
4
- {{#if showTitle}}
5
- <h3>Message
6
- {{#if currentMessage.showCount}}
7
- ({{currentMessage.count}} copies reported)
8
- {{/if}}
9
- </h3>
10
- {{/if}}
11
- <pre>{{currentMessage.message}}</pre>
12
- {{/tab-contents}}
13
- {{#tab-contents name="backtrace" defaultTab="true" hint="show backtrace" currentMessage=currentMessage}}
14
- {{#if showTitle}}
15
- <h3>Backtrace</h3>
16
- {{/if}}
17
- <pre>{{currentMessage.backtrace}}</pre>
18
- {{/tab-contents}}
19
- {{#if currentMessage.env}}
20
- {{#tab-contents className="env" name="env" hint="show environment" currentMessage=currentMessage}}
21
- {{#if showTitle}}
22
- <h3>Env</h3>
23
- {{/if}}
24
- {{{currentMessage.envTable}}}
25
- {{/tab-contents}}
26
- {{/if}}
27
- {{/tabbed-section}}
28
-
29
- {{#if currentMessage}}
30
- <div class='message-actions'>
31
- {{#unless currentMessage.protected}}
32
- {{#if currentMessage.canSolve}}
33
- <button {{action 'solve'}} class="solve btn danger"><i class='fa fa-check-square-o'></i>Solve</button>
34
- {{/if}}
35
-
36
- <button {{action 'remove'}} class="delete btn danger"><i class='fa fa-trash-o'></i>Delete</button>
37
- <button {{action 'protect'}} class="protect btn"><i class='fa fa-lock'></i>Protect</button>
38
- {{else}}
39
- <button {{action 'unprotect'}} class="unprotect btn"><i class='fa fa-unlock'></i>Unprotect</button>
40
- {{/unless}}
41
- <a href="{{currentMessage.shareUrl}}" class="share btn"><i class='fa fa-share'></i>Share</a>
42
- </div>
43
- {{/if}}
44
- </div>
1
+ <div class="message-info">
2
+ {{#tabbed-section}}
3
+ {{#tab-contents name="info" hint="show info" currentMessage=currentMessage}}
4
+ {{#if showTitle}}
5
+ <h3>Message
6
+ {{#if currentMessage.showCount}}
7
+ ({{currentMessage.count}} copies reported)
8
+ {{/if}}
9
+ </h3>
10
+ {{/if}}
11
+ <pre>{{currentMessage.message}}</pre>
12
+ {{/tab-contents}}
13
+ {{#tab-contents name="backtrace" defaultTab="true" hint="show backtrace" currentMessage=currentMessage}}
14
+ {{#if showTitle}}
15
+ <h3>Backtrace</h3>
16
+ {{/if}}
17
+ <pre>{{currentMessage.backtrace}}</pre>
18
+ {{/tab-contents}}
19
+ {{#if currentMessage.env}}
20
+ {{#tab-contents className="env" name="env" hint="show environment" currentMessage=currentMessage}}
21
+ {{#if showTitle}}
22
+ <h3>Env</h3>
23
+ {{/if}}
24
+ {{{currentMessage.envTable}}}
25
+ {{/tab-contents}}
26
+ {{/if}}
27
+ {{/tabbed-section}}
28
+
29
+ {{#if currentMessage}}
30
+ <div class='message-actions'>
31
+ {{#unless currentMessage.protected}}
32
+ {{#if currentMessage.canSolve}}
33
+ <button {{action 'solve'}} class="solve btn danger"><i class='fa fa-check-square-o'></i>Solve</button>
34
+ {{/if}}
35
+
36
+ <button {{action 'remove'}} class="delete btn danger"><i class='fa fa-trash-o'></i>Delete</button>
37
+ <button {{action 'protect'}} class="protect btn"><i class='fa fa-lock'></i>Protect</button>
38
+ {{else}}
39
+ <button {{action 'unprotect'}} class="unprotect btn"><i class='fa fa-unlock'></i>Unprotect</button>
40
+ {{/unless}}
41
+ <a href="{{currentMessage.shareUrl}}" class="share btn"><i class='fa fa-share'></i>Share</a>
42
+ </div>
43
+ {{/if}}
44
+ </div>
@@ -1,17 +1,17 @@
1
- <td class="count">
2
- {{#if model.showCount}}
3
- <span>{{model.count}}</span>
4
- {{/if}}
5
- </td>
6
- <td class="severity">{{{model.glyph}}}</td>
7
- <td class="message-body">
8
- <div class="message">
9
- {{model.displayMessage}}
10
- </div>
11
- </td>
12
- <td class='protected'>
13
- {{#if model.protected}}
14
- <i title="message is protected, clearing will not remove it" class='fa fa-lock'></i>
15
- {{/if}}
16
- </td>
17
- <td class="time">{{time-formatter timestamp=model.timestamp}}</td>
1
+ <td class="count">
2
+ {{#if model.showCount}}
3
+ <span>{{model.count}}</span>
4
+ {{/if}}
5
+ </td>
6
+ <td class="severity">{{{model.glyph}}}</td>
7
+ <td class="message-body">
8
+ <div class="message">
9
+ {{model.displayMessage}}
10
+ </div>
11
+ </td>
12
+ <td class='protected'>
13
+ {{#if model.protected}}
14
+ <i title="message is protected, clearing will not remove it" class='fa fa-lock'></i>
15
+ {{/if}}
16
+ </td>
17
+ <td class="time">{{time-formatter timestamp=model.timestamp}}</td>
@@ -1,10 +1,10 @@
1
- {{yield}}
2
- <ul class="tabs">
3
- {{#each tabs as |tab|}}
4
- <li>
5
- <a title="{{unbound tab.hint}}" href="#" class="{{if tab.active 'active'}}" {{action selectTab tab}}>
6
- {{unbound tab.name}}
7
- </a>
8
- </li>
9
- {{/each}}
10
- </ul>
1
+ {{yield}}
2
+ <ul class="tabs">
3
+ {{#each tabs as |tab|}}
4
+ <li>
5
+ <a title="{{unbound tab.hint}}" href="#" class="{{if tab.active 'active'}}" {{action selectTab tab}}>
6
+ {{unbound tab.name}}
7
+ </a>
8
+ </li>
9
+ {{/each}}
10
+ </ul>
@@ -1 +1 @@
1
- {{time}}
1
+ {{time}}
@@ -1,57 +1,57 @@
1
- <div id='top-panel'>
2
- <table id='log-table'>
3
- <thead>
4
- <tr>
5
- <th class="count"></th>
6
- <th class="severity"></th>
7
- <th class="info"></th>
8
- <th class="protected"></th>
9
- <th class="time"></th>
10
- </tr>
11
- </thead>
12
- <tbody>
13
- {{#if model.moreBefore}}
14
- <tr {{action "showMoreBefore"}} class="show-more">
15
- <td colspan=5>select to see {{model.totalBefore}} more</td>
16
- </tr>
17
- {{/if}}
18
- {{#each model.messages as |message|}}
19
- {{message-row model=message selectedMessage=(action "selectMessage")}}
20
- {{/each}}
21
- </tbody>
22
- </table>
23
- </div>
24
- {{panel-resizer}}
25
- <div id="bottom-panel">
26
- {{message-info currentMessage=currentMessage removeMessage=(action "removeMessage") solveMessage=(action "solveMessage")}}
27
-
28
- <div class="action-panel">
29
- <label class="debug">
30
- {{input type="checkbox" checked=showDebug}}
31
- Debug
32
- </label>
33
- <label class="info">
34
- {{input type="checkbox" checked=showInfo}}
35
- Info
36
- </label>
37
- <label class="warn">
38
- {{input type="checkbox" checked=showWarn}}
39
- <i class='fa fa-exclamation-circle warning'></i>
40
- Warning
41
- </label>
42
- <label class="error">
43
- {{input type="checkbox" checked=showErr}}
44
- <i class='fa fa-times-circle error'></i>
45
- Error
46
- </label>
47
- <label class="fatal">
48
- {{input type="checkbox" checked=showFatal}}
49
- <i class='fa fa-times-circle fatal'></i>
50
- Fatal
51
- </label>
52
- <label class="search">
53
- {{input type="textfield" placeholder="Search" value=search}}
54
- </label>
55
- <a class="clear btn danger" href {{action "clear"}}><i class='fa fa-times'></i> Clear logs</a>
56
- </div>
57
- </div>
1
+ <div id='top-panel'>
2
+ <table id='log-table'>
3
+ <thead>
4
+ <tr>
5
+ <th class="count"></th>
6
+ <th class="severity"></th>
7
+ <th class="info"></th>
8
+ <th class="protected"></th>
9
+ <th class="time"></th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ {{#if model.moreBefore}}
14
+ <tr {{action "showMoreBefore"}} class="show-more">
15
+ <td colspan=5>select to see {{model.totalBefore}} more</td>
16
+ </tr>
17
+ {{/if}}
18
+ {{#each model.messages as |message|}}
19
+ {{message-row model=message selectedMessage=(action "selectMessage")}}
20
+ {{/each}}
21
+ </tbody>
22
+ </table>
23
+ </div>
24
+ {{panel-resizer}}
25
+ <div id="bottom-panel">
26
+ {{message-info currentMessage=currentMessage removeMessage=(action "removeMessage") solveMessage=(action "solveMessage")}}
27
+
28
+ <div class="action-panel">
29
+ <label class="debug">
30
+ {{input type="checkbox" checked=showDebug}}
31
+ Debug
32
+ </label>
33
+ <label class="info">
34
+ {{input type="checkbox" checked=showInfo}}
35
+ Info
36
+ </label>
37
+ <label class="warn">
38
+ {{input type="checkbox" checked=showWarn}}
39
+ <i class='fa fa-exclamation-circle warning'></i>
40
+ Warning
41
+ </label>
42
+ <label class="error">
43
+ {{input type="checkbox" checked=showErr}}
44
+ <i class='fa fa-times-circle error'></i>
45
+ Error
46
+ </label>
47
+ <label class="fatal">
48
+ {{input type="checkbox" checked=showFatal}}
49
+ <i class='fa fa-times-circle fatal'></i>
50
+ Fatal
51
+ </label>
52
+ <label class="search">
53
+ {{input type="textfield" placeholder="Search" value=search}}
54
+ </label>
55
+ <a class="clear btn danger" href {{action "clear"}}><i class='fa fa-times'></i> Clear logs</a>
56
+ </div>
57
+ </div>
@@ -1,4 +1,4 @@
1
- {{#link-to 'index'}}Recent{{/link-to}}
2
- <div id="bottom-panel" class="full">
3
- {{message-info currentMessage=model showTitle="true"}}
4
- </div>
1
+ {{#link-to 'index'}}Recent{{/link-to}}
2
+ <div id="bottom-panel" class="full">
3
+ {{message-info currentMessage=model showTitle="true"}}
4
+ </div>
@@ -1,51 +1,51 @@
1
- 'use strict';
2
-
3
- module.exports = function(environment) {
4
- let ENV = {
5
- modulePrefix: 'client-app',
6
- environment,
7
- rootURL: '/logs',
8
- locationType: 'history',
9
- EmberENV: {
10
- FEATURES: {
11
- // Here you can enable experimental features on an ember canary build
12
- // e.g. 'with-controller': true
13
- },
14
- EXTEND_PROTOTYPES: {
15
- // Prevent Ember Data from overriding Date.parse.
16
- Date: false
17
- }
18
- },
19
-
20
- APP: {
21
- // Here you can pass flags/options to your application instance
22
- // when it is created
23
- }
24
- };
25
-
26
- if (environment === 'development') {
27
- // ENV.APP.LOG_RESOLVER = true;
28
- // ENV.APP.LOG_ACTIVE_GENERATION = true;
29
- // ENV.APP.LOG_TRANSITIONS = true;
30
- // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
31
- // ENV.APP.LOG_VIEW_LOOKUPS = true;
32
- }
33
-
34
- if (environment === 'test') {
35
- // Testem prefers this...
36
- ENV.locationType = 'none';
37
-
38
- // keep test console output quieter
39
- ENV.APP.LOG_ACTIVE_GENERATION = false;
40
- ENV.APP.LOG_VIEW_LOOKUPS = false;
41
-
42
- ENV.APP.rootElement = '#ember-testing';
43
- ENV.APP.autoboot = false;
44
- }
45
-
46
- if (environment === 'production') {
47
- // here you can enable a production-specific feature
48
- }
49
-
50
- return ENV;
51
- };
1
+ 'use strict';
2
+
3
+ module.exports = function(environment) {
4
+ let ENV = {
5
+ modulePrefix: 'client-app',
6
+ environment,
7
+ rootURL: '/logs',
8
+ locationType: 'history',
9
+ EmberENV: {
10
+ FEATURES: {
11
+ // Here you can enable experimental features on an ember canary build
12
+ // e.g. 'with-controller': true
13
+ },
14
+ EXTEND_PROTOTYPES: {
15
+ // Prevent Ember Data from overriding Date.parse.
16
+ Date: false
17
+ }
18
+ },
19
+
20
+ APP: {
21
+ // Here you can pass flags/options to your application instance
22
+ // when it is created
23
+ }
24
+ };
25
+
26
+ if (environment === 'development') {
27
+ // ENV.APP.LOG_RESOLVER = true;
28
+ // ENV.APP.LOG_ACTIVE_GENERATION = true;
29
+ // ENV.APP.LOG_TRANSITIONS = true;
30
+ // ENV.APP.LOG_TRANSITIONS_INTERNAL = true;
31
+ // ENV.APP.LOG_VIEW_LOOKUPS = true;
32
+ }
33
+
34
+ if (environment === 'test') {
35
+ // Testem prefers this...
36
+ ENV.locationType = 'none';
37
+
38
+ // keep test console output quieter
39
+ ENV.APP.LOG_ACTIVE_GENERATION = false;
40
+ ENV.APP.LOG_VIEW_LOOKUPS = false;
41
+
42
+ ENV.APP.rootElement = '#ember-testing';
43
+ ENV.APP.autoboot = false;
44
+ }
45
+
46
+ if (environment === 'production') {
47
+ // here you can enable a production-specific feature
48
+ }
49
+
50
+ return ENV;
51
+ };
@@ -1,3 +1,3 @@
1
- {
2
- "jquery-integration": true
3
- }
1
+ {
2
+ "jquery-integration": true
3
+ }
@@ -1,18 +1,18 @@
1
- 'use strict';
2
-
3
- const browsers = [
4
- 'last 1 Chrome versions',
5
- 'last 1 Firefox versions',
6
- 'last 1 Safari versions'
7
- ];
8
-
9
- const isCI = !!process.env.CI;
10
- const isProduction = process.env.EMBER_ENV === 'production';
11
-
12
- if (isCI || isProduction) {
13
- browsers.push('ie 11');
14
- }
15
-
16
- module.exports = {
17
- browsers
18
- };
1
+ 'use strict';
2
+
3
+ const browsers = [
4
+ 'last 1 Chrome versions',
5
+ 'last 1 Firefox versions',
6
+ 'last 1 Safari versions'
7
+ ];
8
+
9
+ const isCI = !!process.env.CI;
10
+ const isProduction = process.env.EMBER_ENV === 'production';
11
+
12
+ if (isCI || isProduction) {
13
+ browsers.push('ie 11');
14
+ }
15
+
16
+ module.exports = {
17
+ browsers
18
+ };
@@ -1,29 +1,29 @@
1
- 'use strict';
2
-
3
- const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4
-
5
- module.exports = function(defaults) {
6
- var app = new EmberApp(defaults, {
7
- // Add options here
8
- fingerprint: {
9
- enabled: false
10
- }
11
- });
12
-
13
- // Use `app.import` to add additional libraries to the generated
14
- // output files.
15
- //
16
- // If you need to use different assets in different
17
- // environments, specify an object as the first parameter. That
18
- // object's keys should be the environment name and the values
19
- // should be the asset to use in that environment.
20
- //
21
- // If the library that you are including contains AMD or ES6
22
- // modules that you would like to import into your application
23
- // please specify an object with the list of modules as keys
24
- // along with the exports of each module as its value.
25
-
26
- app.import("node_modules/lodash/lodash.min.js");
27
- app.import("node_modules/moment/min/moment.min.js");
28
- return app.toTree();
29
- };
1
+ 'use strict';
2
+
3
+ const EmberApp = require('ember-cli/lib/broccoli/ember-app');
4
+
5
+ module.exports = function(defaults) {
6
+ var app = new EmberApp(defaults, {
7
+ // Add options here
8
+ fingerprint: {
9
+ enabled: false
10
+ }
11
+ });
12
+
13
+ // Use `app.import` to add additional libraries to the generated
14
+ // output files.
15
+ //
16
+ // If you need to use different assets in different
17
+ // environments, specify an object as the first parameter. That
18
+ // object's keys should be the environment name and the values
19
+ // should be the asset to use in that environment.
20
+ //
21
+ // If the library that you are including contains AMD or ES6
22
+ // modules that you would like to import into your application
23
+ // please specify an object with the list of modules as keys
24
+ // along with the exports of each module as its value.
25
+
26
+ app.import("node_modules/lodash/lodash.min.js");
27
+ app.import("node_modules/moment/min/moment.min.js");
28
+ return app.toTree();
29
+ };