logster 2.11.4 → 2.12.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +63 -12
- data/.gitignore +2 -0
- data/CHANGELOG.md +10 -5
- data/README.md +8 -0
- data/assets/javascript/.gitkeep +0 -0
- data/assets/javascript/chunk.143.2faa04830259ce9aa59a.js +22 -0
- data/assets/javascript/chunk.178.ca5ade1d8cbdbfbe6d72.js +22 -0
- data/assets/javascript/chunk.468.95dd450003497c781cb3.js +1213 -0
- data/assets/javascript/chunk.916.85a3fc9d873df80f5ea5.js +579 -0
- data/assets/javascript/client-app.js +1257 -280
- data/assets/javascript/vendor.js +4068 -3375
- data/assets/stylesheets/.gitkeep +0 -0
- data/assets/stylesheets/client-app.css +1 -1
- data/assets/stylesheets/vendor.css +1 -1
- data/build_client_app.sh +6 -8
- data/client-app/.editorconfig +0 -1
- data/client-app/.eslintignore +2 -0
- data/client-app/.eslintrc +10 -0
- data/client-app/.gitignore +1 -1
- data/client-app/.prettierignore +21 -0
- data/client-app/.prettierrc +1 -0
- data/client-app/.template-lintrc.js +10 -0
- data/client-app/README.md +4 -5
- data/client-app/app/app.js +2 -2
- data/client-app/app/components/actions-menu.js +21 -21
- data/client-app/app/components/back-trace.js +89 -90
- data/client-app/app/components/env-tab.js +41 -29
- data/client-app/app/components/message-info.js +78 -75
- data/client-app/app/components/message-row.js +20 -17
- data/client-app/app/components/page-nav.js +33 -24
- data/client-app/app/components/panel-resizer.js +53 -37
- data/client-app/app/components/patterns-list.js +101 -84
- data/client-app/app/components/tab-contents.js +15 -19
- data/client-app/app/components/tabbed-section.js +30 -18
- data/client-app/app/components/time-formatter.js +29 -18
- data/client-app/app/controllers/index.js +143 -119
- data/client-app/app/controllers/show.js +17 -13
- data/client-app/app/helpers/or.js +1 -1
- data/client-app/app/initializers/app-init.js +23 -34
- data/client-app/app/lib/decorators.js +4 -2
- data/client-app/app/lib/preload.js +7 -4
- data/client-app/app/lib/utilities.js +55 -54
- data/client-app/app/models/group.js +20 -15
- data/client-app/app/models/message-collection.js +153 -149
- data/client-app/app/models/message.js +60 -58
- data/client-app/app/models/pattern-item.js +24 -22
- data/client-app/app/router.js +2 -2
- data/client-app/app/routes/index.js +19 -12
- data/client-app/app/routes/settings.js +12 -10
- data/client-app/app/routes/show.js +6 -4
- data/client-app/app/services/events.js +4 -0
- data/client-app/app/styles/app.css +2 -0
- data/client-app/app/templates/application.hbs +1 -2
- data/client-app/app/templates/components/actions-menu.hbs +23 -8
- data/client-app/app/templates/components/back-trace.hbs +10 -3
- data/client-app/app/templates/components/env-tab.hbs +9 -7
- data/client-app/app/templates/components/message-info.hbs +65 -34
- data/client-app/app/templates/components/message-row.hbs +25 -8
- data/client-app/app/templates/components/page-nav.hbs +34 -10
- data/client-app/app/templates/components/panel-resizer.hbs +3 -3
- data/client-app/app/templates/components/patterns-list.hbs +54 -20
- data/client-app/app/templates/components/tabbed-section.hbs +12 -4
- data/client-app/app/templates/components/time-formatter.hbs +1 -1
- data/client-app/app/templates/index.hbs +100 -78
- data/client-app/app/templates/settings.hbs +30 -19
- data/client-app/app/templates/show.hbs +9 -8
- data/client-app/config/ember-cli-update.json +18 -0
- data/client-app/config/environment.js +13 -13
- data/client-app/config/icons.js +3 -3
- data/client-app/config/targets.js +16 -8
- data/client-app/ember-cli-build.js +4 -4
- data/client-app/package.json +41 -31
- data/client-app/testem.js +16 -17
- data/client-app/tests/index.html +8 -1
- data/client-app/tests/integration/components/back-trace-test.js +32 -26
- data/client-app/tests/integration/components/env-tab-test.js +79 -53
- data/client-app/tests/integration/components/message-info-test.js +25 -23
- data/client-app/tests/integration/components/patterns-list-test.js +14 -11
- data/client-app/tests/test-helper.js +8 -4
- data/client-app/tests/unit/controllers/index-test.js +32 -16
- data/client-app/tests/unit/controllers/show-test.js +5 -5
- data/client-app/tests/unit/routes/index-test.js +5 -5
- data/client-app/tests/unit/routes/show-test.js +5 -5
- data/client-app/yarn.lock +9673 -0
- data/lib/logster/version.rb +1 -1
- data/logster.gemspec +6 -3
- metadata +15 -6
- data/client-app/.eslintrc.js +0 -60
- data/client-app/.travis.yml +0 -28
- data/client-app/app/components/update-time.js +0 -21
- data/client-app/package-lock.json +0 -16639
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5d4640abe80e2cf5a80e7f2f11e6419b00a32130b35d62c05564d33e4ecf530
|
4
|
+
data.tar.gz: a974a5a37f0c210d804d97e496819189c331d5f10b426fee6b831345a289e68a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0a4ce41d8e47036447f2849d8cbafc71982c0164164562174fa8ef7a5a1a446d4f55f38eef6240404ce2ff23ae0ba451672ae3331a718a6d6e7535135ecc36d
|
7
|
+
data.tar.gz: 8acd7e2d037f7713d28b3dd1cbcc7624201016d398010b9e0dfb7806b4483100ec9fa502a7658a01b2fd5e18b095cb8de140337e28aad95b23a7925fcfd167f7
|
data/.github/workflows/ci.yml
CHANGED
@@ -29,8 +29,18 @@ jobs:
|
|
29
29
|
ruby-version: ${{ matrix.ruby }}
|
30
30
|
bundler-cache: true
|
31
31
|
|
32
|
-
-
|
33
|
-
|
32
|
+
- uses: actions/setup-node@v3
|
33
|
+
with:
|
34
|
+
node-version: 18
|
35
|
+
cache: yarn
|
36
|
+
cache-dependency-path: client-app/yarn.lock
|
37
|
+
|
38
|
+
- name: Yarn install
|
39
|
+
working-directory: client-app
|
40
|
+
run: yarn install
|
41
|
+
|
42
|
+
- name: Build JS app
|
43
|
+
run: bash build_client_app.sh
|
34
44
|
|
35
45
|
- name: Tests
|
36
46
|
run: bundle exec rake test
|
@@ -43,30 +53,71 @@ jobs:
|
|
43
53
|
|
44
54
|
- uses: actions/setup-node@v3
|
45
55
|
with:
|
46
|
-
node-version:
|
47
|
-
cache:
|
48
|
-
cache-dependency-path: client-app/
|
56
|
+
node-version: 18
|
57
|
+
cache: yarn
|
58
|
+
cache-dependency-path: client-app/yarn.lock
|
49
59
|
|
50
|
-
- name:
|
60
|
+
- name: Yarn install
|
51
61
|
working-directory: client-app
|
52
|
-
run:
|
62
|
+
run: yarn install
|
53
63
|
|
54
|
-
- name: JS
|
64
|
+
- name: JS tests
|
55
65
|
working-directory: client-app
|
56
|
-
run:
|
66
|
+
run: yarn test:ember
|
57
67
|
|
58
|
-
|
68
|
+
linting:
|
69
|
+
runs-on: ubuntu-latest
|
70
|
+
|
71
|
+
steps:
|
72
|
+
- uses: actions/checkout@v3
|
73
|
+
|
74
|
+
- name: Setup ruby
|
75
|
+
uses: ruby/setup-ruby@v1
|
76
|
+
with:
|
77
|
+
ruby-version: 3.2
|
78
|
+
bundler-cache: true
|
79
|
+
|
80
|
+
- name: Ruby lint
|
81
|
+
run: bundle exec rubocop
|
82
|
+
|
83
|
+
- uses: actions/setup-node@v3
|
84
|
+
if: ${{ !cancelled() }}
|
85
|
+
with:
|
86
|
+
node-version: 18
|
87
|
+
cache: yarn
|
88
|
+
cache-dependency-path: client-app/yarn.lock
|
89
|
+
|
90
|
+
- name: Yarn install
|
91
|
+
if: ${{ !cancelled() }}
|
59
92
|
working-directory: client-app
|
60
|
-
run:
|
93
|
+
run: yarn install
|
94
|
+
|
95
|
+
- name: JS linting
|
96
|
+
if: ${{ !cancelled() }}
|
97
|
+
working-directory: client-app
|
98
|
+
run: yarn lint
|
61
99
|
|
62
100
|
publish:
|
63
101
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
64
|
-
needs: [backend, frontend]
|
102
|
+
needs: [backend, frontend, linting]
|
65
103
|
runs-on: ubuntu-latest
|
66
104
|
|
67
105
|
steps:
|
68
106
|
- uses: actions/checkout@v3
|
69
107
|
|
108
|
+
- uses: actions/setup-node@v3
|
109
|
+
with:
|
110
|
+
node-version: 18
|
111
|
+
cache: yarn
|
112
|
+
cache-dependency-path: client-app/yarn.lock
|
113
|
+
|
114
|
+
- name: Yarn install
|
115
|
+
working-directory: client-app
|
116
|
+
run: yarn install
|
117
|
+
|
118
|
+
- name: Build JS app
|
119
|
+
run: bash build_client_app.sh
|
120
|
+
|
70
121
|
- name: Release Gem
|
71
122
|
uses: discourse/publish-rubygems-action@v2
|
72
123
|
env:
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
# CHANGELOG
|
2
|
+
|
3
|
+
- 2023-03-03: 2.12.0
|
4
|
+
|
5
|
+
- DEV: Upgrade to Ember 3.28
|
6
|
+
|
2
7
|
- 2023-01-30: 2.11.4
|
3
8
|
|
4
|
-
- DEV: Various dependencies upgrade
|
5
|
-
- FIX: Switch the `/messages.json` endpoint from `GET` to `POST`
|
9
|
+
- DEV: Various dependencies upgrade
|
10
|
+
- FIX: Switch the `/messages.json` endpoint from `GET` to `POST`
|
6
11
|
|
7
12
|
- 2022-08-25: 2.11.3
|
8
13
|
|
9
|
-
- DEV: Avoid deprecation warning in Redis 4.8 (#166)
|
14
|
+
- DEV: Avoid deprecation warning in Redis 4.8 (#166)
|
10
15
|
|
11
16
|
- 2022-04-28: 2.11.2
|
12
17
|
|
13
|
-
- FIX: store override level in thread local storage (Truffle Ruby
|
18
|
+
- FIX: store override level in thread local storage (Truffle Ruby compatibility)
|
14
19
|
|
15
20
|
- 2022-04-21: 2.11.1
|
16
21
|
|
@@ -359,7 +364,7 @@
|
|
359
364
|
|
360
365
|
- 2014-05-13: Version 0.0.8
|
361
366
|
|
362
|
-
- Fix
|
367
|
+
- Fix packaging binstubs by mistake
|
363
368
|
|
364
369
|
- 2014-05-13: Version 0.0.7
|
365
370
|
|
data/README.md
CHANGED
@@ -63,12 +63,14 @@ Logster can be configured using `Logster.config`:
|
|
63
63
|
- `Logster.config.gems_dir` : The value of this config is `Gem.dir + "/gems/"` by default. You probably don't need to change this config, but it's available in case your app gems are installed in a different directory. An example where this config is needed is Logster [demo site](http://logster.info/logs/): [https://github.com/discourse/logster/blob/master/website/sample.rb#L77](https://github.com/discourse/logster/blob/master/website/sample.rb#L77).
|
64
64
|
|
65
65
|
### Tracking Error Rate
|
66
|
+
|
66
67
|
Logster allows you to register a callback when the rate of errors has exceeded
|
67
68
|
a given limit.
|
68
69
|
|
69
70
|
Tracking buckets available are one minute and an hour.
|
70
71
|
|
71
72
|
Example:
|
73
|
+
|
72
74
|
```
|
73
75
|
Logster.register_rate_limit_per_minute(Logger::WARN, 60) do |rate|
|
74
76
|
puts "O no! The error rate is now #{rate} errors/min"
|
@@ -80,6 +82,7 @@ end
|
|
80
82
|
```
|
81
83
|
|
82
84
|
### Note
|
85
|
+
|
83
86
|
If you are seeing the error `No such middleware to insert before: ActionDispatch::DebugExceptions` after installing logster,
|
84
87
|
then you are using a conflicting gem like `better_errors` or `web-console`.
|
85
88
|
|
@@ -90,6 +93,7 @@ If you're using Logster with a non-rails app, you'll need to be careful that the
|
|
90
93
|
The reason this doesn't happen in rails apps is because ActiveSupport has a monkey patch for [`#to_json`](https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/json.rb).
|
91
94
|
|
92
95
|
### Mount using warden (devise)
|
96
|
+
|
93
97
|
```
|
94
98
|
admin_constraint = lambda do |request|
|
95
99
|
request.env['warden'].authenticate? and request.env['warden'].user.admin?
|
@@ -101,9 +105,11 @@ The reason this doesn't happen in rails apps is because ActiveSupport has a monk
|
|
101
105
|
```
|
102
106
|
|
103
107
|
### Mount using devise (method 2)
|
108
|
+
|
104
109
|
Change :admin_user symbol with your devise user, example :user.
|
105
110
|
In -> lambda block change admin? method with your authorization method
|
106
111
|
Or simply define a admin? method in you user model.
|
112
|
+
|
107
113
|
```
|
108
114
|
authenticate :admin_user, ->(u) { u.admin? } do
|
109
115
|
mount Logster::Web, at: "/logs"
|
@@ -117,7 +123,9 @@ Logster.store = Logster::RedisStore.new(redis_connection)
|
|
117
123
|
```
|
118
124
|
|
119
125
|
### Heroku Deployment
|
126
|
+
|
120
127
|
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:
|
128
|
+
|
121
129
|
```
|
122
130
|
if Rails.env.production?
|
123
131
|
Rails.logger.extend(ActiveSupport::Logger.broadcast(Logster.logger))
|
File without changes
|
@@ -0,0 +1,22 @@
|
|
1
|
+
var __ember_auto_import__
|
2
|
+
!function(){var e,r={976:function(e,r,n){var o,t
|
3
|
+
e.exports=(o=_eai_d,t=_eai_r,window.emberAutoImportDynamic=function(e){return 1===arguments.length?t("_eai_dyn_"+e):t("_eai_dynt_"+e)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(e){return t("_eai_sync_"+e)(Array.prototype.slice.call(arguments,1))},o("__v1-addons__early-boot-set__",[],(function(){})),void o("sinon",["__v1-addons__early-boot-set__"],(function(){return n(468)})))},249:function(e,r){window._eai_r=require,window._eai_d=define}},n={}
|
4
|
+
function o(e){var t=n[e]
|
5
|
+
if(void 0!==t)return t.exports
|
6
|
+
var i=n[e]={exports:{}}
|
7
|
+
return r[e].call(i.exports,i,i.exports,o),i.exports}o.m=r,e=[],o.O=function(r,n,t,i){if(!n){var u=1/0
|
8
|
+
for(c=0;c<e.length;c++){n=e[c][0],t=e[c][1],i=e[c][2]
|
9
|
+
for(var _=!0,a=0;a<n.length;a++)(!1&i||u>=i)&&Object.keys(o.O).every((function(e){return o.O[e](n[a])}))?n.splice(a--,1):(_=!1,i<u&&(u=i))
|
10
|
+
if(_){e.splice(c--,1)
|
11
|
+
var f=t()
|
12
|
+
void 0!==f&&(r=f)}}return r}i=i||0
|
13
|
+
for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1]
|
14
|
+
e[c]=[n,t,i]},o.d=function(e,r){for(var n in r)o.o(r,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={143:0}
|
15
|
+
o.O.j=function(r){return 0===e[r]}
|
16
|
+
var r=function(r,n){var t,i,u=n[0],_=n[1],a=n[2],f=0
|
17
|
+
if(u.some((function(r){return 0!==e[r]}))){for(t in _)o.o(_,t)&&(o.m[t]=_[t])
|
18
|
+
if(a)var c=a(o)}for(r&&r(n);f<u.length;f++)i=u[f],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0
|
19
|
+
return o.O(c)},n=self.webpackChunk_ember_auto_import_=self.webpackChunk_ember_auto_import_||[]
|
20
|
+
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))}(),o.O(void 0,[468],(function(){return o(249)}))
|
21
|
+
var t=o.O(void 0,[468],(function(){return o(976)}))
|
22
|
+
t=o.O(t),__ember_auto_import__=t}()
|
@@ -0,0 +1,22 @@
|
|
1
|
+
var __ember_auto_import__
|
2
|
+
!function(){var r,n={249:function(r,n){window._eai_r=require,window._eai_d=define},489:function(r,n,e){var t,o
|
3
|
+
r.exports=(t=_eai_d,o=_eai_r,window.emberAutoImportDynamic=function(r){return 1===arguments.length?o("_eai_dyn_"+r):o("_eai_dynt_"+r)(Array.prototype.slice.call(arguments,1))},window.emberAutoImportSync=function(r){return o("_eai_sync_"+r)(Array.prototype.slice.call(arguments,1))},t("__v1-addons__early-boot-set__",[],(function(){})),void t("qunit",["__v1-addons__early-boot-set__"],(function(){return e(916)})))}},e={}
|
4
|
+
function t(r){var o=e[r]
|
5
|
+
if(void 0!==o)return o.exports
|
6
|
+
var i=e[r]={id:r,loaded:!1,exports:{}}
|
7
|
+
return n[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}t.m=n,r=[],t.O=function(n,e,o,i){if(!e){var _=1/0
|
8
|
+
for(f=0;f<r.length;f++){e=r[f][0],o=r[f][1],i=r[f][2]
|
9
|
+
for(var u=!0,a=0;a<e.length;a++)(!1&i||_>=i)&&Object.keys(t.O).every((function(r){return t.O[r](e[a])}))?e.splice(a--,1):(u=!1,i<_&&(_=i))
|
10
|
+
if(u){r.splice(f--,1)
|
11
|
+
var c=o()
|
12
|
+
void 0!==c&&(n=c)}}return n}i=i||0
|
13
|
+
for(var f=r.length;f>0&&r[f-1][2]>i;f--)r[f]=r[f-1]
|
14
|
+
r[f]=[e,o,i]},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.nmd=function(r){return r.paths=[],r.children||(r.children=[]),r},function(){var r={178:0}
|
15
|
+
t.O.j=function(n){return 0===r[n]}
|
16
|
+
var n=function(n,e){var o,i,_=e[0],u=e[1],a=e[2],c=0
|
17
|
+
if(_.some((function(n){return 0!==r[n]}))){for(o in u)t.o(u,o)&&(t.m[o]=u[o])
|
18
|
+
if(a)var f=a(t)}for(n&&n(e);c<_.length;c++)i=_[c],t.o(r,i)&&r[i]&&r[i][0](),r[i]=0
|
19
|
+
return t.O(f)},e=self.webpackChunk_ember_auto_import_=self.webpackChunk_ember_auto_import_||[]
|
20
|
+
e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),t.O(void 0,[916],(function(){return t(249)}))
|
21
|
+
var o=t.O(void 0,[916],(function(){return t(489)}))
|
22
|
+
o=t.O(o),__ember_auto_import__=o}()
|