logster 2.9.5 → 2.10.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d345ea97aaa14da2ee33a19bd3de2faeaf3dbbfb4c85f5e6d8ee22ebabef1494
4
- data.tar.gz: 8299ad0dd1ba1137a60a548936903ae96f0765d5a4199aee9ac16b1201d7ec46
3
+ metadata.gz: 36c08792eefe71ec4a2d0a1f0431d3096a8d96f13f4675abf2912bf5b21019cd
4
+ data.tar.gz: 4783ab4414adf42d225dff51508fc85c1f3d7b0d2d6b55ed48ab850240fc91c4
5
5
  SHA512:
6
- metadata.gz: 3bb53ed7cfe6cb6696b25cf2fdcc2f71f055007e1d2bb7f56837817daee4bb0b241686559d522b542010ddfe228d1b8f3b69e090d967de5c08bf1b722ffdaa08
7
- data.tar.gz: 66b1ad08fcf9182eac2584533fd316280ef75c5ba9e3f15c94e3dd847692a01980c7709b667e0476491820dc50fa3d198abc8c24f088460dd3a3d9c72ea3817a
6
+ metadata.gz: daa42d7b54352c0b8e8807499b71a20785a6dc966f4295469405c78578ad75d860224b04f788b7c72e847aef15f454f31db5918f54a780367d02abce79463f9e
7
+ data.tar.gz: 8babf62b5e5dbab3bd806b044baf9780b66abd16de01608a7489afdc693203651d69037c6f491fbc094422dbd8c045840f687887dc43d6ae9bd3b0e9a60db65e
@@ -1,63 +1,70 @@
1
- name: Logster Tests
1
+ name: CI
2
2
 
3
3
  on:
4
+ pull_request:
4
5
  push:
5
6
  branches:
6
7
  - master
7
- pull_request:
8
+ - main
8
9
 
9
10
  jobs:
10
- ruby:
11
+ build:
11
12
  runs-on: ubuntu-latest
12
- name: Ruby ${{ matrix.ruby }}
13
+
14
+ services:
15
+ redis:
16
+ image: redis
17
+ ports:
18
+ - 6379:6379
19
+
13
20
  strategy:
14
21
  matrix:
15
- ruby: ["2.7", "2.6", "2.5"]
16
- redis: ["4.x"]
22
+ ruby:
23
+ - 2.5
24
+ - 2.6
25
+ - 2.7
26
+ - 3.0
27
+
17
28
  steps:
18
29
  - uses: actions/checkout@v2
19
- - uses: actions/setup-ruby@v1
30
+
31
+ - name: Setup ruby
32
+ uses: ruby/setup-ruby@v1
20
33
  with:
21
34
  ruby-version: ${{ matrix.ruby }}
22
- - uses: shogo82148/actions-setup-redis@v1
23
- with:
24
- redis-version: ${{ matrix.redis }}
25
- - name: Bundler cache
26
- uses: actions/cache@v2
27
- with:
28
- path: vendor/bundle
29
- key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
30
- restore-keys: |
31
- ${{ runner.os }}-${{ matrix.ruby }}-gems-
32
- - name: Setup gems
33
- run: |
34
- gem install bundler
35
- bundle config path vendor/bundle
36
- bundle install --jobs 4
37
- - name: Rubocop
35
+ bundler-cache: true
36
+
37
+ - name: Ruby lint
38
38
  run: bundle exec rubocop
39
+
39
40
  - name: Tests
40
41
  run: bundle exec rake test
41
- js:
42
- runs-on: ubuntu-latest
43
- name: JavaScript Lint
44
- defaults:
45
- run:
42
+
43
+ - uses: actions/setup-node@v2
44
+ with:
45
+ node-version: 16
46
+ cache: npm
47
+ cache-dependency-path: client-app/package-lock.json
48
+
49
+ - name: Npm install
50
+ working-directory: client-app
51
+ run: npm install
52
+
53
+ - name: JS linting
46
54
  working-directory: client-app
55
+ run: npm run lint
56
+
57
+ publish:
58
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
59
+ needs: build
60
+ runs-on: ubuntu-latest
61
+
47
62
  steps:
48
63
  - uses: actions/checkout@v2
49
- - name: Get yarn cache directory
50
- id: yarn-cache-dir
51
- run: echo "::set-output name=dir::$(yarn cache dir)"
52
- - name: Yarn cache
53
- uses: actions/cache@v2
54
- id: yarn-cache
55
- with:
56
- path: ${{ steps.yarn-cache-dir.outputs.dir }}
57
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
58
- restore-keys: |
59
- ${{ runner.os }}-yarn-
60
- - name: Yarn install
61
- run: yarn install
62
- - name: ESLint
63
- run: yarn eslint .
64
+
65
+ - name: Release Gem
66
+ uses: discourse/publish-rubygems-action@v2
67
+ env:
68
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
69
+ GIT_EMAIL: team@discourse.org
70
+ GIT_NAME: discoursebot
data/.gitignore CHANGED
@@ -1,21 +1 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
1
  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
19
- .rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
20
- *.swo
21
- *.swp
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # CHANGELOG
2
2
 
3
+ - 2021-11-26: 2.10.0
4
+
5
+ - FEATURE: Introduce dark mode
6
+
7
+ - 2021-10-27: 2.9.8
8
+
9
+ - FIX: We weren't properly memoizing the hostname
10
+
11
+ - 2021-07-01: 2.9.7
12
+
13
+ - FEATURE: Optionally use full hostname
14
+
15
+ - 2021-02-19: 2.9.6
16
+
17
+ - UX: Make `Warn` level visible by default
18
+
3
19
  - 2021-01-21: 2.9.5
4
20
 
5
21
  - FIX: Stop encoding errors when converting Message objects to JSON (#128)
@@ -340,4 +356,5 @@
340
356
  - Feature: Store backtraces, allow people to view them in the GUI
341
357
 
342
358
  - 2014-05-07: Started changelog :)
359
+
343
360
  - Report params in env tab
@@ -107,7 +107,7 @@ var n=Ember.Component.extend({didInsertElement:function(){Ember.run.later(this,t
107
107
  if(n){var r=(0,t.formatTime)(n)
108
108
  r!==e.innerText&&(e.innerText=r)}})),Ember.run.later(this,this.updateTimes,6e4)}})
109
109
  e.default=n})),define("client-app/controllers/index",["exports","client-app/lib/utilities","client-app/lib/preload"],(function(e,t,n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
110
- var r=Ember.Controller.extend({showDebug:(0,t.getLocalStorage)("showDebug",!1),showInfo:(0,t.getLocalStorage)("showInfo",!1),showWarn:(0,t.getLocalStorage)("showWarn",!1),showErr:(0,t.getLocalStorage)("showErr",!0),showFatal:(0,t.getLocalStorage)("showFatal",!0),search:"",queryParams:["search"],showSettings:Ember.computed((function(){return n.default.get("patterns_enabled")})),resizePanels:function(e){var t=document.getElementById("bottom-panel"),n=document.getElementById("top-panel")
110
+ var r=Ember.Controller.extend({showDebug:(0,t.getLocalStorage)("showDebug",!1),showInfo:(0,t.getLocalStorage)("showInfo",!1),showWarn:(0,t.getLocalStorage)("showWarn",!0),showErr:(0,t.getLocalStorage)("showErr",!0),showFatal:(0,t.getLocalStorage)("showFatal",!0),search:"",queryParams:["search"],showSettings:Ember.computed((function(){return n.default.get("patterns_enabled")})),resizePanels:function(e){var t=document.getElementById("bottom-panel"),n=document.getElementById("top-panel")
111
111
  t.style.height="".concat(e-13,"px"),n.style.bottom="".concat(e+12,"px")},actionsInMenu:Ember.computed((function(){return this.site.isMobile})),actions:{expandMessage:function(e){e.expand()},selectRowAction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}
112
112
  this.model.selectRow(e,t)},tabChangedAction:function(e){this.model.tabChanged(e)},showMoreBefore:function(){this.model.showMoreBefore()},loadMore:function(){return this.model.loadMore()},clear:function(){var e=this
113
113
  confirm("Clear the logs?\n\nCancel = No, OK = Clear")&&(0,t.ajax)("/clear",{type:"POST"}).then((function(){e.model.reload()}))},removeMessage:function(e){var t=this.model.currentRow.group?this.model.currentRow:null,n=this.model.rows,r=t?n.indexOf(t):n.indexOf(e)
@@ -294,4 +294,4 @@ var t=Ember.HTMLBars.template({id:"QRu+EVou",block:'{"symbols":[],"statements":[
294
294
  e.default=t})),define("client-app/templates/show",["exports"],(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
295
295
  var t=Ember.HTMLBars.template({id:"Xt+M1cRV",block:'{"symbols":[],"statements":[[4,"link-to",null,[["route"],["index"]],{"statements":[[0,"Recent"]],"parameters":[]},null],[0,"\\n"],[7,"div",true],[10,"id","bottom-panel"],[10,"class","full"],[8],[0,"\\n "],[1,[28,"message-info",null,[["currentMessage","showTitle","envChangedAction","currentEnvPosition","actionsInMenu"],[[24,["model"]],"true",[28,"action",[[23,0,[]],"envChanged"],null],[24,["envPosition"]],false]]],false],[0,"\\n"],[9],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"client-app/templates/show.hbs"}})
296
296
  e.default=t})),define("client-app/config/environment",[],(function(){try{var e="client-app/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(decodeURIComponent(t))}
297
- return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("client-app/app").default.create({name:"client-app",version:"0.0.0+845c295b"})
297
+ return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("client-app/app").default.create({name:"client-app",version:"v2.9.5+847cfaf3"})
@@ -1 +1 @@
1
- #bottom-panel:not(.full) .nav-controls.env-nav,.divider,.message-info,.nav-controls.group-nav{border-bottom:1px solid #ddd}body{font-family:Arial,"Liberation Sans","DejaVu Sans",sans-serif;font-size:12px}body.mobile,body.mobile .message{font-size:14px}pre{font-family:"Roboto Mono",Consolas,Monaco,Ubuntu Mono,monospace}table.env-table tbody tr td{border-top:none;line-height:18px;height:18px;vertical-align:top}table.env-table,table.env-table table{border-spacing:0;border-collapse:collapse}table.env-table td{padding-right:5px}tbody tr{width:98%}.message-row{font-family:Roboto;display:flex}.message-row .protected,.message-row .severity{text-align:center;width:25px;flex-grow:0;flex-shrink:0;font-size:12px}.message-row div{border-top:.5px #e9e9e9 solid;padding-top:1px;padding-bottom:1px;line-height:25px}.message-row .count{width:30px;flex-grow:0;flex-shrink:0;padding-right:4px;box-sizing:border-box;font-size:11px;font-weight:700;text-align:right}.message-row .message-body{flex-grow:1;flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px}.message-row .time{flex-grow:0;flex-shrink:0;color:#999;vertical-align:top;font-size:12px;padding-right:8px}.action-panel .search,.action-panel .svg-inline--fa,.pattern-wrapper .pattern-input,.pattern-wrapper .shrink,.search-clear-all .btn.clear span,.search-clear-all .clear,input,label span{vertical-align:middle}.message-row:hover{background-color:#f8f8f8;cursor:pointer}.message-row.selected{background-color:#dfdfdf}.svg-inline--fa.fatal{color:#e00}.svg-inline--fa.error{color:#900}.svg-inline--fa.warning{color:#feb800}.debug{color:#777}.btn,.tabs a{text-decoration:none;color:#333}.action-panel .search{border:1px solid #ddd;padding:3px;box-sizing:border-box}#log-table .show-more{text-align:center;height:30px;line-height:30px;text-decoration:none;background-color:#ddd;cursor:pointer;margin-top:8px}#bottom-panel{position:fixed;bottom:0;left:0;right:0;height:300px;background-color:#f1f1f1;padding:0 8px 8px;z-index:2}#bottom-panel.full{position:static;background-color:inherit;height:90%}#bottom-panel.full>div{padding-bottom:40px}#bottom-panel.full .tabs{display:none}#bottom-panel.full .message-info{position:static}#bottom-panel.full .message-info .content{display:block;position:static}#bottom-panel.full .save,#bottom-panel.full .share{bottom:10px}#bottom-panel.full button.delete{display:none}#bottom-panel.full .message-actions button{margin-top:8px}@media (max-width:382px){#bottom-panel.full .message-actions{height:73px}}@media (min-width:383px){#bottom-panel.full .message-actions{height:40px}}#bottom-panel.full .message-actions{position:fixed;width:100%;left:0;bottom:0;background-color:#eee;border-top:1px solid #dfdfdf;padding-left:10px}.divider,.tabs{border-top:1px solid #ddd}.message-actions{position:absolute;bottom:5px;right:0;margin-right:10px}.message-actions button{margin-left:5px}.divider{position:fixed;bottom:310px;left:0;right:0;height:15px;background-color:#fafafa;cursor:row-resize}.divider div{margin:auto;width:24px;height:1px;background-color:#ccc;position:relative}.divider .line-1{top:5px}.divider .line-2{top:6px}.divider .line-3{top:7px}#top-panel{position:fixed;top:0;left:0;right:0;bottom:320px;overflow:auto}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;left:0;right:0}.message-info{top:0}#bottom-panel.group-view .message-info{top:43px}.action-panel{bottom:0;font-weight:700}.action-panel input{margin:0}.severity-filters label{margin-right:18px}.search-clear-all .clear{float:right}#log-table{margin:auto;width:99%}.btn span{display:inline}.hidden{display:none}.message-info .env-table,.message-info pre{position:relative;margin:5px 10px 10px}#overlay{position:fixed;z-index:99999;top:0;bottom:0;left:0;right:0;cursor:row-resize;opacity:0}.message-info .content,.tabs{position:absolute;left:0;right:0}.message-info .content{top:0;bottom:35px;overflow:auto;display:none}.message-info .content.active{display:block}.tabs{bottom:13px;list-style-type:none;margin:0 0 5px;padding:0 0 0 10px}.tabs a,.tabs li{position:relative}.tabs li{float:left;padding-right:5px;margin:0}.tabs a{top:6px;border:1px solid #ddd;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;padding:6px;background-color:#e1e1e1}.tabs a.active{border-top:1px solid #f1f1f1;background-color:#f1f1f1}.btn{display:inline-block;margin:0;padding:5px 12px;font-size:1em;line-height:0;text-align:center;cursor:pointer;transition:all .25s;background-color:#ddd;border:none;font-weight:400}.btn:hover{color:#000;background-color:#ccc}.btn .svg-inline--fa{margin-right:7px}.btn:active{text-shadow:none}.btn.danger:hover{background-color:#c63c1b;color:#eee}.btn.ok{background-color:#3781dc;color:#fff}.btn.ok:hover{background-color:#286dc2;color:#fff}.search-clear-all .btn.clear,.search-clear-all .search{height:100%}.search-clear-all .btn.clear,.search-clear-all .search,.severity-filters label{align-self:center}.search-clear-all .footer-btns .settings{height:100%;box-sizing:border-box;margin:0 7px;display:inline-flex;align-items:center}.search-clear-all{display:flex;justify-content:space-between}.search-clear-all .search{min-width:0;flex-shrink:2}.footer-btns{flex-grow:0;flex-shrink:0}@media (min-width:771px){.search-clear-all,.severity-filters{height:100%}.more-wrapping,.severity-filters{display:flex}.severity-filters{float:left}.action-panel{padding:10px;box-sizing:border-box;height:45px}.message-info{bottom:45px}}@media (max-width:770px){.severity-filters{padding:10px}.search-clear-all{padding:0 10px 10px}.action-panel{height:69px}.message-info{bottom:69px}}@media (max-width:430px){.severity-filters{overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.more-wrapping:after,.more-wrapping:before{content:"";position:absolute;height:18px}.more-wrapping:before{width:15px;margin-left:-10px;background:linear-gradient(to right,#f1f1f1 0,rgba(241,241,241,.001) 100%)}.more-wrapping:after{right:0;width:23px;background:linear-gradient(to left,#f1f1f1 0,rgba(241,241,241,.001) 100%)}}.btn.no-text .svg-inline--fa{margin:0}.btn[disabled]{opacity:.5}.actions-menu{position:absolute;background:#fafafa;display:inline-flex;flex-direction:column;bottom:27px;right:45px;width:115px;padding:5px 5px 0;box-shadow:0 4px 14px rgba(0,0,0,.15);z-index:3}.actions-menu button{margin:0 0 5px;height:27px}.nav-controls{padding:10px}#bottom-panel:not(.full) .nav-controls.env-nav{position:sticky;position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;top:0;background:#f1f1f1;z-index:1}.current-number{margin:0 7px}.expand-list{text-decoration:underline;color:#00f;cursor:pointer}.settings-page{max-width:1110px;margin-right:auto;margin-left:auto;font-size:15px;padding:0 10px 70px}.settings-header{display:flex;align-items:center;margin-bottom:5px}.settings-header .header-title{flex-grow:1}.settings-header .header-logo{width:50px;height:50px}.settings-section{padding-top:15px}.settings-section .section-title{margin-top:0}.settings-section .subsection-title{margin-bottom:10px}.settings-section .tip{font-style:italic;font-size:13px;color:grey}.settings-section .pattern-wrapper{margin-top:10px;font-size:16px;display:flex;height:33px}.settings-section .api-error{font-family:Consolas,"Roboto Mono",Monaco,Ubuntu Mono,monospace;margin-top:5px;color:red}.pattern-wrapper .pattern-input{font-family:Consolas,"Roboto Mono",Monaco,Ubuntu Mono,monospace;width:600px;font-size:inherit;padding:5px 0;height:100%;box-sizing:border-box;flex-grow:1;flex-shrink:1}.retro-checkbox .checkbox{margin:0}.retro-checkbox{margin-top:7px}.btn.new-pattern{height:100%;line-height:18px}.pattern-wrapper .shrink{height:100%;width:40px;text-align:center;box-sizing:border-box;flex-grow:0;flex-shrink:0;margin-left:10px}.svg-inline--fa{opacity:.7}.pattern-wrapper .shrink.reset{background:unset;width:unset;padding:0;margin-left:8px}.grouping-patterns button.new-pattern{margin-top:10px}.backtrace-line .line-link{color:#9e9e9e;margin-left:3px}
1
+ #bottom-panel:not(.full) .nav-controls.env-nav,.divider,.message-info,.nav-controls.group-nav{border-bottom:1px solid #ddd}body{font-family:Arial,"Liberation Sans","DejaVu Sans",sans-serif;font-size:12px}body.mobile,body.mobile .message{font-size:14px}pre{font-family:"Roboto Mono",Consolas,Monaco,Ubuntu Mono,monospace}table.env-table tbody tr td{border-top:none;line-height:18px;height:18px;vertical-align:top}table.env-table,table.env-table table{border-spacing:0;border-collapse:collapse}table.env-table td{padding-right:5px}tbody tr{width:98%}.message-row{font-family:Roboto;display:flex}.message-row .protected,.message-row .severity{text-align:center;width:25px;flex-grow:0;flex-shrink:0;font-size:12px}.message-row div{border-top:.5px #e9e9e9 solid;padding-top:1px;padding-bottom:1px;line-height:25px}.message-row .count{width:30px;flex-grow:0;flex-shrink:0;padding-right:4px;box-sizing:border-box;font-size:11px;font-weight:700;text-align:right}.message-row .message-body{flex-grow:1;flex-shrink:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px}.message-row .time{flex-grow:0;flex-shrink:0;color:#999;vertical-align:top;font-size:12px;padding-right:8px}.action-panel .search,.action-panel .svg-inline--fa,.pattern-wrapper .pattern-input,.pattern-wrapper .shrink,.search-clear-all .btn.clear span,.search-clear-all .clear,input,label span{vertical-align:middle}.message-row:hover{background-color:#f8f8f8;cursor:pointer}.message-row.selected{background-color:#dfdfdf}.svg-inline--fa.fatal{color:#e00}.svg-inline--fa.error{color:#900}.svg-inline--fa.warning{color:#feb800}.debug{color:#777}.btn,.tabs a{text-decoration:none;color:#333}.action-panel .search{border:1px solid #ddd;padding:3px;box-sizing:border-box}#log-table .show-more{text-align:center;height:30px;line-height:30px;text-decoration:none;background-color:#ddd;cursor:pointer;margin-top:8px}#bottom-panel{position:fixed;bottom:0;left:0;right:0;height:300px;background-color:#f1f1f1;padding:0 8px 8px;z-index:2}#bottom-panel.full{position:static;background-color:inherit;height:90%}#bottom-panel.full>div{padding-bottom:40px}#bottom-panel.full .tabs{display:none}#bottom-panel.full .message-info{position:static}#bottom-panel.full .message-info .content{display:block;position:static}#bottom-panel.full .save,#bottom-panel.full .share{bottom:10px}#bottom-panel.full button.delete{display:none}#bottom-panel.full .message-actions button{margin-top:8px}@media (max-width:382px){#bottom-panel.full .message-actions{height:73px}}@media (min-width:383px){#bottom-panel.full .message-actions{height:40px}}#bottom-panel.full .message-actions{position:fixed;width:100%;left:0;bottom:0;background-color:#eee;border-top:1px solid #dfdfdf;padding-left:10px}.divider,.tabs{border-top:1px solid #ddd}.message-actions{position:absolute;bottom:5px;right:0;margin-right:10px}.message-actions button{margin-left:5px}.divider{position:fixed;bottom:310px;left:0;right:0;height:15px;background-color:#fafafa;cursor:row-resize}.divider div{margin:auto;width:24px;height:1px;background-color:#ccc;position:relative}.divider .line-1{top:5px}.divider .line-2{top:6px}.divider .line-3{top:7px}#top-panel{position:fixed;top:0;left:0;right:0;bottom:320px;overflow:auto}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;left:0;right:0}.message-info{top:0}#bottom-panel.group-view .message-info{top:43px}.action-panel{bottom:0;font-weight:700}.action-panel input{margin:0}.severity-filters label{margin-right:18px}.search-clear-all .clear{float:right}#log-table{margin:auto;width:99%}.btn span{display:inline}.hidden{display:none}.message-info .env-table,.message-info pre{position:relative;margin:5px 10px 10px}#overlay{position:fixed;z-index:99999;top:0;bottom:0;left:0;right:0;cursor:row-resize;opacity:0}.message-info .content,.tabs{position:absolute;left:0;right:0}.message-info .content{top:0;bottom:35px;overflow:auto;display:none}.message-info .content.active{display:block}.tabs{bottom:13px;list-style-type:none;margin:0 0 5px;padding:0 0 0 10px}.tabs a,.tabs li{position:relative}.tabs li{float:left;padding-right:5px;margin:0}.tabs a{top:6px;border:1px solid #ddd;border-top:none;border-bottom-left-radius:5px;border-bottom-right-radius:5px;padding:6px;background-color:#e1e1e1}.tabs a.active{border-top:1px solid #f1f1f1;background-color:#f1f1f1}.btn{display:inline-block;margin:0;padding:5px 12px;font-size:1em;line-height:0;text-align:center;cursor:pointer;transition:all .25s;background-color:#ddd;border:none;font-weight:400}.btn:hover{color:#000;background-color:#ccc}.btn .svg-inline--fa{margin-right:7px}.btn:active{text-shadow:none}.btn.danger:hover{background-color:#c63c1b;color:#eee}.btn.ok{background-color:#3781dc;color:#fff}.btn.ok:hover{background-color:#286dc2;color:#fff}.search-clear-all .btn.clear,.search-clear-all .search{height:100%}.search-clear-all .btn.clear,.search-clear-all .search,.severity-filters label{align-self:center}.search-clear-all .footer-btns .settings{height:100%;box-sizing:border-box;margin:0 7px;display:inline-flex;align-items:center}.search-clear-all{display:flex;justify-content:space-between}.search-clear-all .search{min-width:0;flex-shrink:2}.footer-btns{flex-grow:0;flex-shrink:0}@media (min-width:771px){.search-clear-all,.severity-filters{height:100%}.more-wrapping,.severity-filters{display:flex}.severity-filters{float:left}.action-panel{padding:10px;box-sizing:border-box;height:45px}.message-info{bottom:45px}}@media (max-width:770px){.severity-filters{padding:10px}.search-clear-all{padding:0 10px 10px}.action-panel{height:69px}.message-info{bottom:69px}}@media (max-width:430px){.severity-filters{overflow-x:scroll;overflow-y:hidden;white-space:nowrap}.more-wrapping:after,.more-wrapping:before{content:"";position:absolute;height:18px}.more-wrapping:before{width:15px;margin-left:-10px;background:linear-gradient(to right,#f1f1f1 0,rgba(241,241,241,.001) 100%)}.more-wrapping:after{right:0;width:23px;background:linear-gradient(to left,#f1f1f1 0,rgba(241,241,241,.001) 100%)}}.btn.no-text .svg-inline--fa{margin:0}.btn[disabled]{opacity:.5}.actions-menu{position:absolute;background:#fafafa;display:inline-flex;flex-direction:column;bottom:27px;right:45px;width:115px;padding:5px 5px 0;box-shadow:0 4px 14px rgba(0,0,0,.15);z-index:3}.actions-menu button{margin:0 0 5px;height:27px}.nav-controls{padding:10px}#bottom-panel:not(.full) .nav-controls.env-nav{position:sticky;position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;top:0;background:#f1f1f1;z-index:1}.current-number{margin:0 7px}.expand-list{text-decoration:underline;color:#00f;cursor:pointer}.settings-page{max-width:1110px;margin-right:auto;margin-left:auto;font-size:15px;padding:0 10px 70px}.settings-header{display:flex;align-items:center;margin-bottom:5px}.settings-header .header-title{flex-grow:1}.settings-header .header-logo{width:50px;height:50px}.settings-section{padding-top:15px}.settings-section .section-title{margin-top:0}.settings-section .subsection-title{margin-bottom:10px}.settings-section .tip{font-style:italic;font-size:13px;color:grey}.settings-section .pattern-wrapper{margin-top:10px;font-size:16px;display:flex;height:33px}.settings-section .api-error{font-family:Consolas,"Roboto Mono",Monaco,Ubuntu Mono,monospace;margin-top:5px;color:red}.pattern-wrapper .pattern-input{font-family:Consolas,"Roboto Mono",Monaco,Ubuntu Mono,monospace;width:600px;font-size:inherit;padding:5px 0;height:100%;box-sizing:border-box;flex-grow:1;flex-shrink:1}.retro-checkbox .checkbox{margin:0}.retro-checkbox{margin-top:7px}.btn.new-pattern{height:100%;line-height:18px}.pattern-wrapper .shrink{height:100%;width:40px;text-align:center;box-sizing:border-box;flex-grow:0;flex-shrink:0;margin-left:10px}.svg-inline--fa{opacity:.7}.pattern-wrapper .shrink.reset{background:unset;width:unset;padding:0;margin-left:8px}.grouping-patterns button.new-pattern{margin-top:10px}.backtrace-line .line-link{color:#9e9e9e;margin-left:3px}@media (prefers-color-scheme:dark){#bottom-panel,body{background:#181818}.btn,.tabs a,body{color:#cecece}.message-row div{border-top-color:#404040}.message-row:hover{background:#262626}.message-row.selected{background:#303030}#log-table .show-more,.divider{background:#262626}.divider div{background:#707070}.divider,.tabs{border-top-color:#555}#bottom-panel:not(.full) .nav-controls.env-nav,.divider,.message-info,.nav-controls.group-nav{border-bottom-color:#555}.action-panel .search{background:#262626;border-color:#404040}.tabs a{background:#323232;border-color:#404040}.tabs a.active{background:#555;border-color:#707070;color:#f4f4f4}.btn{background:#323232}#bottom-panel.full .message-actions{background:#181818;border-color:#555}}
@@ -11,7 +11,7 @@ import { debounce } from "@ember/runloop";
11
11
  export default Controller.extend({
12
12
  showDebug: getLocalStorage("showDebug", false),
13
13
  showInfo: getLocalStorage("showInfo", false),
14
- showWarn: getLocalStorage("showWarn", false),
14
+ showWarn: getLocalStorage("showWarn", true),
15
15
  showErr: getLocalStorage("showErr", true),
16
16
  showFatal: getLocalStorage("showFatal", true),
17
17
  search: "",
@@ -7,7 +7,8 @@
7
7
  <meta name="description" content="">
8
8
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">
9
9
  <meta id="preloaded-data" data-root-path="/logs">
10
-
10
+ <meta name="color-scheme" content="dark light">
11
+
11
12
  {{content-for "head"}}
12
13
 
13
14
  <link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
@@ -378,7 +378,6 @@ label span {
378
378
  display: inline-block;
379
379
  margin: 0;
380
380
  padding: 5px 12px;
381
- font-weight: 500;
382
381
  font-size: 1em;
383
382
  line-height: 0;
384
383
  text-align: center;
@@ -690,3 +689,80 @@ label span {
690
689
  color: #9e9e9e;
691
690
  margin-left: 3px;
692
691
  }
692
+
693
+ @media (prefers-color-scheme: dark) {
694
+ body {
695
+ background: #181818;
696
+ color: #cecece;
697
+ }
698
+
699
+ #bottom-panel {
700
+ background: #181818;
701
+ }
702
+
703
+ .message-row div {
704
+ border-top-color: #404040;
705
+ }
706
+
707
+ .message-row:hover {
708
+ background: #262626;
709
+ }
710
+
711
+ .message-row.selected {
712
+ background: #303030;
713
+ }
714
+
715
+ #log-table .show-more {
716
+ background: #262626;
717
+ }
718
+
719
+ .divider {
720
+ background: #262626;
721
+ }
722
+
723
+ .divider div {
724
+ background: #707070;
725
+ }
726
+
727
+ .divider,
728
+ .tabs {
729
+ border-top-color: #555;
730
+ }
731
+
732
+ #bottom-panel:not(.full) .nav-controls.env-nav,
733
+ .divider,
734
+ .message-info,
735
+ .nav-controls.group-nav {
736
+ border-bottom-color: #555;
737
+ }
738
+
739
+ .action-panel .search {
740
+ background: #262626;
741
+ border-color: #404040;
742
+ }
743
+
744
+ .btn,
745
+ .tabs a {
746
+ color: #cecece;
747
+ }
748
+
749
+ .tabs a {
750
+ background: #323232;
751
+ border-color: #404040;
752
+ }
753
+
754
+ .tabs a.active {
755
+ background: #555;
756
+ border-color: #707070;
757
+ color: #f4f4f4;
758
+ }
759
+
760
+ .btn {
761
+ background: #323232;
762
+ }
763
+
764
+ #bottom-panel.full .message-actions {
765
+ background: #181818;
766
+ border-color: #555;
767
+ }
768
+ }
@@ -5,6 +5,7 @@
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
+ "name": "client-app",
8
9
  "version": "0.0.0",
9
10
  "license": "MIT",
10
11
  "dependencies": {
@@ -9283,7 +9284,6 @@
9283
9284
  "anymatch": "^2.0.0",
9284
9285
  "async-each": "^1.0.1",
9285
9286
  "braces": "^2.3.2",
9286
- "fsevents": "^1.2.7",
9287
9287
  "glob-parent": "^3.1.0",
9288
9288
  "inherits": "^2.0.3",
9289
9289
  "is-binary-path": "^1.0.0",
@@ -15000,8 +15000,7 @@
15000
15000
  "esprima": "^4.0.1",
15001
15001
  "estraverse": "^4.2.0",
15002
15002
  "esutils": "^2.0.2",
15003
- "optionator": "^0.8.1",
15004
- "source-map": "~0.6.1"
15003
+ "optionator": "^0.8.1"
15005
15004
  },
15006
15005
  "bin": {
15007
15006
  "escodegen": "bin/escodegen.js",
@@ -16666,7 +16665,72 @@
16666
16665
  "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz",
16667
16666
  "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==",
16668
16667
  "bundleDependencies": [
16669
- "node-pre-gyp"
16668
+ "node-pre-gyp",
16669
+ "abbrev",
16670
+ "ansi-regex",
16671
+ "aproba",
16672
+ "are-we-there-yet",
16673
+ "balanced-match",
16674
+ "brace-expansion",
16675
+ "chownr",
16676
+ "code-point-at",
16677
+ "concat-map",
16678
+ "console-control-strings",
16679
+ "core-util-is",
16680
+ "debug",
16681
+ "deep-extend",
16682
+ "delegates",
16683
+ "detect-libc",
16684
+ "fs-minipass",
16685
+ "fs.realpath",
16686
+ "gauge",
16687
+ "glob",
16688
+ "has-unicode",
16689
+ "iconv-lite",
16690
+ "ignore-walk",
16691
+ "inflight",
16692
+ "inherits",
16693
+ "ini",
16694
+ "is-fullwidth-code-point",
16695
+ "isarray",
16696
+ "minimatch",
16697
+ "minimist",
16698
+ "minipass",
16699
+ "minizlib",
16700
+ "mkdirp",
16701
+ "ms",
16702
+ "needle",
16703
+ "nopt",
16704
+ "npm-bundled",
16705
+ "npm-normalize-package-bin",
16706
+ "npm-packlist",
16707
+ "npmlog",
16708
+ "number-is-nan",
16709
+ "object-assign",
16710
+ "once",
16711
+ "os-homedir",
16712
+ "os-tmpdir",
16713
+ "osenv",
16714
+ "path-is-absolute",
16715
+ "process-nextick-args",
16716
+ "rc",
16717
+ "readable-stream",
16718
+ "rimraf",
16719
+ "safe-buffer",
16720
+ "safer-buffer",
16721
+ "sax",
16722
+ "semver",
16723
+ "set-blocking",
16724
+ "signal-exit",
16725
+ "string_decoder",
16726
+ "string-width",
16727
+ "strip-ansi",
16728
+ "strip-json-comments",
16729
+ "tar",
16730
+ "util-deprecate",
16731
+ "wide-align",
16732
+ "wrappy",
16733
+ "yallist"
16670
16734
  ],
16671
16735
  "dev": true,
16672
16736
  "hasInstallScript": true,
@@ -17969,8 +18033,7 @@
17969
18033
  "dependencies": {
17970
18034
  "neo-async": "^2.6.0",
17971
18035
  "optimist": "^0.6.1",
17972
- "source-map": "^0.6.1",
17973
- "uglify-js": "^3.1.4"
18036
+ "source-map": "^0.6.1"
17974
18037
  },
17975
18038
  "bin": {
17976
18039
  "handlebars": "bin/handlebars"
@@ -12,6 +12,7 @@
12
12
  },
13
13
  "scripts": {
14
14
  "build": "ember build",
15
+ "lint": "npm run lint:js && npm run lint:hbs",
15
16
  "lint:hbs": "ember-template-lint .",
16
17
  "lint:js": "eslint .",
17
18
  "start": "ember serve",
@@ -18,7 +18,8 @@ module Logster
18
18
  :gems_dir,
19
19
  :max_env_bytes,
20
20
  :max_env_count_per_message,
21
- :maximum_message_length
21
+ :maximum_message_length,
22
+ :use_full_hostname
22
23
  )
23
24
 
24
25
  attr_writer :subdirectory
@@ -39,6 +40,7 @@ module Logster
39
40
  @enable_backtrace_links = true
40
41
  @gems_dir = Gem.dir + "/gems/"
41
42
  @maximum_message_length = 2000
43
+ @use_full_hostname = nil
42
44
 
43
45
  @allow_grouping = false
44
46
 
@@ -80,7 +80,10 @@ module Logster
80
80
  end
81
81
 
82
82
  def self.hostname
83
- @hostname ||= `hostname`.strip! rescue "<unknown>"
83
+ @hostname ||= begin
84
+ command = (Logster.config.use_full_hostname ? `hostname -f` : `hostname`) rescue "<unknown>"
85
+ command.strip!
86
+ end
84
87
  end
85
88
 
86
89
  def populate_from_env(env)
@@ -372,6 +372,7 @@ module Logster
372
372
  <link href='//fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
373
373
  <link href='//fonts.googleapis.com/css?family=Roboto+Mono' rel='stylesheet' type='text/css'>
374
374
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes">
375
+ <meta name="color-scheme" content="dark light">
375
376
  #{css("vendor.css")}
376
377
  #{css("client-app.css")}
377
378
  #{script("vendor.js")}
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
+ require 'set'
4
5
  require 'logster/base_store'
5
6
  require 'logster/redis_rate_limiter'
6
7
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Logster
4
- VERSION = "2.9.5"
4
+ VERSION = "2.10.0"
5
5
  end
data/logster.gemspec CHANGED
@@ -15,7 +15,9 @@ Gem::Specification.new do |spec|
15
15
  spec.homepage = "https://github.com/discourse/logster"
16
16
  spec.license = "MIT"
17
17
 
18
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ spec.required_ruby_version = ">= 2.5.0"
19
+
20
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
21
  f.start_with?("website") || f.start_with?("bin")
20
22
  end
21
23
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -33,5 +35,5 @@ Gem::Specification.new do |spec|
33
35
  spec.add_development_dependency "guard-minitest"
34
36
  spec.add_development_dependency "timecop"
35
37
  spec.add_development_dependency "byebug", "~> 11.1.0"
36
- spec.add_development_dependency "rubocop-discourse"
38
+ spec.add_development_dependency "rubocop-discourse", "~> 2.4.1"
37
39
  end
@@ -78,6 +78,18 @@ class TestMessage < MiniTest::Test
78
78
  Logster.config.application_version = nil
79
79
  end
80
80
 
81
+ def test_use_full_hostname
82
+ Logster::Message.instance_variable_set(:@hostname, nil)
83
+ Logster.config.use_full_hostname = true
84
+ msg = Logster::Message.new(0, '', 'test', 10)
85
+ msg.populate_from_env({})
86
+
87
+ assert_equal(`hostname -f`.strip!, msg.env["hostname"])
88
+ ensure
89
+ Logster.config.use_full_hostname = nil
90
+ Logster::Message.instance_variable_set(:@hostname, nil)
91
+ end
92
+
81
93
  def test_merging_sums_count_for_both_messages
82
94
  msg1 = Logster::Message.new(0, '', 'test', 10, count: 15)
83
95
  msg2 = Logster::Message.new(0, '', 'test', 20, count: 13)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logster
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.5
4
+ version: 2.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-21 00:00:00.000000000 Z
11
+ date: 2021-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -126,16 +126,16 @@ dependencies:
126
126
  name: rubocop-discourse
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 2.4.1
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 2.4.1
139
139
  description: UI for viewing logs in Rack
140
140
  email:
141
141
  - sam.saffron@gmail.com
@@ -288,14 +288,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
288
288
  requirements:
289
289
  - - ">="
290
290
  - !ruby/object:Gem::Version
291
- version: '0'
291
+ version: 2.5.0
292
292
  required_rubygems_version: !ruby/object:Gem::Requirement
293
293
  requirements:
294
294
  - - ">="
295
295
  - !ruby/object:Gem::Version
296
296
  version: '0'
297
297
  requirements: []
298
- rubygems_version: 3.0.3
298
+ rubygems_version: 3.1.6
299
299
  signing_key:
300
300
  specification_version: 4
301
301
  summary: UI for viewing logs in Rack