logster 2.18.0 → 2.19.0
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 +11 -2
- data/CHANGELOG.md +8 -0
- data/Gemfile +4 -0
- data/Rakefile +5 -2
- data/assets/javascript/{chunk.143.a2d29a1fb97842b7d0eb.js → chunk.143.007c0b8cac64ca844382.js} +4 -4
- data/assets/javascript/{chunk.178.98ff138cdeebea372782.js → chunk.178.c0a58aba01c86271384b.js} +3 -3
- data/assets/javascript/client-app.js +1 -1
- data/assets/stylesheets/client-app.css +1 -1
- data/client-app/app/styles/app.css +4 -0
- data/gemfiles/rails_6.1.gemfile +9 -0
- data/gemfiles/rails_7.0.gemfile +9 -0
- data/gemfiles/rails_7.1.gemfile +9 -0
- data/lib/logster/configuration.rb +1 -3
- data/lib/logster/rails/railtie.rb +37 -19
- data/lib/logster/version.rb +1 -1
- data/lib/logster.rb +1 -1
- data/logster.gemspec +1 -0
- data/test/dummy/config/application.rb +31 -0
- data/test/dummy/config/boot.rb +6 -0
- data/test/dummy/config/environment.rb +6 -0
- data/test/logster/test_railtie.rb +21 -0
- metadata +29 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d640ece62f8205d8c641562f84783cb0f66fca777f39aaf55dc52f8ea65c760
|
4
|
+
data.tar.gz: 9b1462d284873256db1efeac24ef63a88603597d62e17d9664c52cd6e815e13a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2853f439922309af9b48d467d5addaf6724d5ba13942ff82bc14970493e2483cc87dbc9ce380f83314f34dc83b3af8b44e8a23c109eacab7e916b413bbe1551a
|
7
|
+
data.tar.gz: ee0e674832871b45699489cae2e91057a33074927053083efd5ae11291a4c76690f62e5c503f8e1e99e19eabda7fbc617cee77e0e983ad3ecf0921f0594288a6
|
data/.github/workflows/ci.yml
CHANGED
@@ -10,6 +10,8 @@ jobs:
|
|
10
10
|
backend:
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
|
13
|
+
name: "Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }}"
|
14
|
+
|
13
15
|
services:
|
14
16
|
redis:
|
15
17
|
image: redis
|
@@ -18,7 +20,11 @@ jobs:
|
|
18
20
|
|
19
21
|
strategy:
|
20
22
|
matrix:
|
21
|
-
ruby: ['
|
23
|
+
ruby: ['3.0', '3.1', '3.2', '3.3']
|
24
|
+
rails: ['6.1', '7.0', '7.1']
|
25
|
+
|
26
|
+
env:
|
27
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile
|
22
28
|
|
23
29
|
steps:
|
24
30
|
- uses: actions/checkout@v3
|
@@ -42,9 +48,12 @@ jobs:
|
|
42
48
|
- name: Build JS app
|
43
49
|
run: bash build_client_app.sh
|
44
50
|
|
45
|
-
- name: Tests
|
51
|
+
- name: Tests (no Rails)
|
46
52
|
run: bundle exec rake test
|
47
53
|
|
54
|
+
- name: Tests (Railtie)
|
55
|
+
run: bundle exec rake test TEST=test/logster/test_railtie.rb
|
56
|
+
|
48
57
|
frontend:
|
49
58
|
runs-on: ubuntu-latest
|
50
59
|
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ require "bundler/gem_tasks"
|
|
4
4
|
require "rake/testtask"
|
5
5
|
|
6
6
|
Rake::TestTask.new do |t|
|
7
|
-
t.
|
7
|
+
t.test_files = FileList["test/**/test_*"].exclude(%r{test/logster/test_railtie\.rb})
|
8
8
|
end
|
9
9
|
|
10
10
|
task(default: :test)
|
@@ -12,7 +12,10 @@ task(default: :test)
|
|
12
12
|
desc "Starts Sinatra and Ember servers"
|
13
13
|
task :client_dev do
|
14
14
|
begin
|
15
|
-
pid =
|
15
|
+
pid =
|
16
|
+
spawn(
|
17
|
+
"cd website && LOGSTER_ENV=development BUNDLE_GEMFILE=Gemfile bundle exec rackup --host 0.0.0.0",
|
18
|
+
)
|
16
19
|
pid2 = spawn("cd client-app && npx ember s --proxy http://localhost:9292")
|
17
20
|
Process.wait pid
|
18
21
|
Process.wait pid2
|
data/assets/javascript/{chunk.143.a2d29a1fb97842b7d0eb.js → chunk.143.007c0b8cac64ca844382.js}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
var __ember_auto_import__
|
2
|
-
!function(){var e,r={
|
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)})))},
|
2
|
+
!function(){var e,r={530: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)})))},477:function(e,r){window._eai_r=require,window._eai_d=define}},n={}
|
4
4
|
function o(e){var t=n[e]
|
5
5
|
if(void 0!==t)return t.exports
|
6
6
|
var i=n[e]={exports:{}}
|
@@ -17,6 +17,6 @@ var r=function(r,n){var t,i,u=n[0],_=n[1],a=n[2],f=0
|
|
17
17
|
if(u.some((function(r){return 0!==e[r]}))){for(t in _)o.o(_,t)&&(o.m[t]=_[t])
|
18
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
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(
|
21
|
-
var t=o.O(void 0,[468],(function(){return o(
|
20
|
+
n.forEach(r.bind(null,0)),n.push=r.bind(null,n.push.bind(n))}(),o.O(void 0,[468],(function(){return o(477)}))
|
21
|
+
var t=o.O(void 0,[468],(function(){return o(530)}))
|
22
22
|
t=o.O(t),__ember_auto_import__=t}()
|
data/assets/javascript/{chunk.178.98ff138cdeebea372782.js → chunk.178.c0a58aba01c86271384b.js}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
var __ember_auto_import__
|
2
|
-
!function(){var r,n={
|
2
|
+
!function(){var r,n={477:function(r,n){window._eai_r=require,window._eai_d=define},887:function(r,n,e){var t,o
|
3
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
4
|
function t(r){var o=e[r]
|
5
5
|
if(void 0!==o)return o.exports
|
@@ -17,6 +17,6 @@ var n=function(n,e){var o,i,_=e[0],u=e[1],a=e[2],c=0
|
|
17
17
|
if(_.some((function(n){return 0!==r[n]}))){for(o in u)t.o(u,o)&&(t.m[o]=u[o])
|
18
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
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(
|
21
|
-
var o=t.O(void 0,[916],(function(){return t(
|
20
|
+
e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))}(),t.O(void 0,[916],(function(){return t(477)}))
|
21
|
+
var o=t.O(void 0,[916],(function(){return t(887)}))
|
22
22
|
o=t.O(o),__ember_auto_import__=o}()
|
@@ -1387,4 +1387,4 @@ var r=(0,t.createTemplateFactory)({id:"qqSpoh9d",block:'[[[10,0],[14,0,"settings
|
|
1387
1387
|
e.default=r})),define("client-app/templates/show",["exports","@ember/template-factory"],(function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
1388
1388
|
var r=(0,t.createTemplateFactory)({id:"d6AYgHoB",block:'[[[8,[39,0],[[24,0,"recent-link"]],[["@route"],["index"]],[["default"],[[[[1,"Recent"]],[]]]]],[1,"\\n\\n"],[10,0],[14,1,"bottom-panel"],[14,0,"full"],[12],[1,"\\n "],[8,[39,1],null,[["@currentMessage","@showTitle","@removeMessage","@solveMessage","@envChangedAction","@currentEnvPosition","@actionsInMenu"],[[30,0,["model"]],"true",[30,0,["removeMessage"]],[30,0,["solveMessage"]],[30,0,["envChanged"]],[30,0,["envPosition"]],false]],null],[1,"\\n"],[13]],[],false,["link-to","message-info"]]',moduleName:"client-app/templates/show.hbs",isStrictMode:!1})
|
1389
1389
|
e.default=r})),define("client-app/config/environment",[],(function(){try{var e="client-app/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),r={default:JSON.parse(decodeURIComponent(t))}
|
1390
|
-
return Object.defineProperty(r,"__esModule",{value:!0}),r}catch(n){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+
|
1390
|
+
return Object.defineProperty(r,"__esModule",{value:!0}),r}catch(n){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+a023d778"})
|
@@ -1 +1 @@
|
|
1
|
-
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%}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loading{border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;width:30px;height:30px;animation:spin 1s linear infinite;margin:40dvh auto}.message-row,.message-row-wrapper{display:flex;width:inherit}.message-row{font-family:Roboto}.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}#overlay,.divider{cursor:row-resize}#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;border-bottom:1px solid #ddd;background-color:#fafafa}.divider div{margin:auto;width:24px;height:1px;background-color:#ccc;position:relative}#overlay,#top-menu,#top-panel{position:fixed}.divider .line-1{top:5px}.divider .line-2,.tabs a{top:6px}.divider .line-3{top:7px}#top-panel{top:0;left:0;right:0;bottom:320px;overflow:auto}#top-panel.with-top-menu{top:35px}#top-menu{z-index:900;left:0;top:0;width:100%}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;left:0;right:0}#back-to-site-panel{padding:10px;background-color:#f1f1f1;height:15px}.message-info{border-bottom:1px solid #ddd;top:0}#bottom-panel.group-view .message-info{top:43px}.nav-controls.group-nav{border-bottom:1px solid #ddd}.action-panel{bottom:0;font-weight:700}.action-panel input{margin:0}.severity-filters label{margin-right:10px}.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{z-index:99999;top:0;bottom:0;left:0;right:0;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{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 8px;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;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{display:flex;gap:.7em}@media (min-width:871px){.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:870px){.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;border-bottom:1px solid #ddd}.current-number{margin:0 7px}.expand-list,.recent-link{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;text-decoration:none;white-space:normal}@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}#bottom-panel:not(.full) .nav-controls.env-nav{background:#181818}.expand-list,.recent-link{color:#44f}}
|
1
|
+
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%}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.loading{border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;width:30px;height:30px;animation:spin 1s linear infinite;margin:40dvh auto}.message-row,.message-row-wrapper{display:flex;width:inherit}.message-row{font-family:Roboto}.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}#overlay,.divider{cursor:row-resize}#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;border-bottom:1px solid #ddd;background-color:#fafafa}.divider div{margin:auto;width:24px;height:1px;background-color:#ccc;position:relative}#overlay,#top-menu,#top-panel{position:fixed}.divider .line-1{top:5px}.divider .line-2,.tabs a{top:6px}.divider .line-3{top:7px}#top-panel{top:0;left:0;right:0;bottom:320px;overflow:auto}#top-panel.with-top-menu{top:35px}#top-menu{z-index:900;left:0;top:0;width:100%}.action-panel,.message-info,.nav-controls.group-nav{position:absolute;left:0;right:0}#back-to-site-panel{padding:10px;background-color:#f1f1f1;height:15px}.message-info{border-bottom:1px solid #ddd;top:0}#bottom-panel.group-view .message-info{top:43px}.nav-controls.group-nav{border-bottom:1px solid #ddd}.action-panel{bottom:0;font-weight:700}.action-panel input{margin:0}.severity-filters label{margin-right:10px}.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{z-index:99999;top:0;bottom:0;left:0;right:0;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{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 8px;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;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{display:flex;gap:.7em}@media (min-width:871px){.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:870px){.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;border-bottom:1px solid #ddd}.current-number{margin:0 7px}.expand-list,.recent-link{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;text-decoration:none;white-space:normal}@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}#bottom-panel:not(.full) .nav-controls.env-nav{background:#181818}.expand-list,.recent-link{color:#44f}#back-to-site-panel{background-color:#181818}}
|
@@ -46,9 +46,7 @@ module Logster
|
|
46
46
|
|
47
47
|
@allow_grouping = false
|
48
48
|
|
49
|
-
|
50
|
-
@allow_grouping = true
|
51
|
-
end
|
49
|
+
@allow_grouping = true if defined?(::Rails.env) && ::Rails.env.production?
|
52
50
|
end
|
53
51
|
|
54
52
|
def subdirectory
|
@@ -5,32 +5,39 @@ module Logster::Rails
|
|
5
5
|
class Engine < Rails::Engine
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
class << self
|
9
|
+
def set_logger(config)
|
10
|
+
return unless Logster.config.environments.include?(Rails.env.to_sym)
|
10
11
|
|
11
|
-
|
12
|
-
|
12
|
+
require "logster/middleware/debug_exceptions"
|
13
|
+
require "logster/middleware/reporter"
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
store = Logster.store ||= Logster::RedisStore.new
|
16
|
+
store.level = Logger::Severity::WARN if Rails.env.production?
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
if Rails.env.development?
|
19
|
+
require "logster/defer_logger"
|
20
|
+
logger = Logster::DeferLogger.new(store)
|
21
|
+
else
|
22
|
+
logger = Logster::Logger.new(store)
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
logger.level = ::Rails.logger.level
|
25
|
+
logger.level = ::Rails.logger.level
|
26
26
|
|
27
|
-
|
28
|
-
end
|
27
|
+
Logster.logger = config.logger = logger
|
29
28
|
|
30
|
-
|
31
|
-
|
29
|
+
if rails_71?
|
30
|
+
::Rails.logger.broadcast_to(logger)
|
31
|
+
else
|
32
|
+
logger.chain(::Rails.logger)
|
33
|
+
::Rails.logger = logger
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def initialize!(app)
|
38
|
+
return unless Logster.config.environments.include?(Rails.env.to_sym)
|
39
|
+
return unless logster_enabled?
|
32
40
|
|
33
|
-
if Logster::Logger === Rails.logger
|
34
41
|
if Logster.config.enable_js_error_reporting
|
35
42
|
app.middleware.insert_before ActionDispatch::ShowExceptions, Logster::Middleware::Reporter
|
36
43
|
end
|
@@ -52,6 +59,17 @@ module Logster::Rails
|
|
52
59
|
Logster.config.application_version = git_version.strip if git_version.present?
|
53
60
|
end
|
54
61
|
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def logster_enabled?
|
66
|
+
return ::Rails.logger == Logster.logger unless rails_71?
|
67
|
+
::Rails.logger.broadcasts.include?(Logster.logger)
|
68
|
+
end
|
69
|
+
|
70
|
+
def rails_71?
|
71
|
+
::Rails.version >= "7.1"
|
72
|
+
end
|
55
73
|
end
|
56
74
|
|
57
75
|
class Railtie < ::Rails::Railtie
|
data/lib/logster/version.rb
CHANGED
data/lib/logster.rb
CHANGED
@@ -57,4 +57,4 @@ end
|
|
57
57
|
# check logster/configuration.rb for config options
|
58
58
|
# Logster.config.environments << :staging
|
59
59
|
|
60
|
-
require "logster/rails/railtie" if defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 3
|
60
|
+
require "logster/rails/railtie" if defined?(::Rails::VERSION) && ::Rails::VERSION::MAJOR.to_i >= 3
|
data/logster.gemspec
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "boot"
|
3
|
+
|
4
|
+
require "active_record/railtie"
|
5
|
+
require "action_controller/railtie"
|
6
|
+
|
7
|
+
# Require the gems listed in Gemfile, including any gems
|
8
|
+
# you've limited to :test, :development, or :production.
|
9
|
+
Bundler.require(*Rails.groups)
|
10
|
+
|
11
|
+
require "logster"
|
12
|
+
|
13
|
+
module Dummy
|
14
|
+
class Application < Rails::Application
|
15
|
+
config.load_defaults Rails::VERSION::STRING.to_f
|
16
|
+
|
17
|
+
# For compatibility with applications that use this config
|
18
|
+
config.action_controller.include_all_helpers = false
|
19
|
+
|
20
|
+
config.eager_load = false
|
21
|
+
|
22
|
+
# Configuration for the application, engines, and railties goes here.
|
23
|
+
#
|
24
|
+
# These settings can be overridden in specific environments using the files
|
25
|
+
# in config/environments, which are processed later.
|
26
|
+
#
|
27
|
+
# config.time_zone = "Central Time (US & Canada)"
|
28
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
29
|
+
Logster.set_environments([Rails.env.to_sym])
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Set up gems listed in the Gemfile.
|
3
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile", __dir__)
|
4
|
+
|
5
|
+
require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"])
|
6
|
+
$LOAD_PATH.unshift File.expand_path("../../../lib", __dir__)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
ENV["RAILS_ENV"] = "test"
|
4
|
+
|
5
|
+
require "redis"
|
6
|
+
require_relative "../dummy/config/environment"
|
7
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("dummy/db/migrate", __dir__)]
|
8
|
+
|
9
|
+
require_relative "../test_helper"
|
10
|
+
|
11
|
+
class TestRailtie < Minitest::Test
|
12
|
+
def test_sets_logger
|
13
|
+
refute_nil Logster.logger
|
14
|
+
|
15
|
+
if Rails.version >= "7.1"
|
16
|
+
assert_includes Rails.logger.broadcasts, Logster.logger
|
17
|
+
else
|
18
|
+
assert_equal Rails.logger, Logster.logger
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
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.
|
4
|
+
version: 2.19.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: 2024-02-
|
11
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sqlite3
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: UI for viewing logs in Rack
|
154
168
|
email:
|
155
169
|
- sam.saffron@gmail.com
|
@@ -172,8 +186,8 @@ files:
|
|
172
186
|
- assets/images/icon_144x144.png
|
173
187
|
- assets/images/icon_64x64.png
|
174
188
|
- assets/javascript/.gitkeep
|
175
|
-
- assets/javascript/chunk.143.
|
176
|
-
- assets/javascript/chunk.178.
|
189
|
+
- assets/javascript/chunk.143.007c0b8cac64ca844382.js
|
190
|
+
- assets/javascript/chunk.178.c0a58aba01c86271384b.js
|
177
191
|
- assets/javascript/chunk.468.95dd450003497c781cb3.js
|
178
192
|
- assets/javascript/chunk.916.85a3fc9d873df80f5ea5.js
|
179
193
|
- assets/javascript/client-app.js
|
@@ -263,6 +277,9 @@ files:
|
|
263
277
|
- client-app/tests/unit/routes/index-test.js
|
264
278
|
- client-app/tests/unit/routes/show-test.js
|
265
279
|
- client-app/yarn.lock
|
280
|
+
- gemfiles/rails_6.1.gemfile
|
281
|
+
- gemfiles/rails_7.0.gemfile
|
282
|
+
- gemfiles/rails_7.1.gemfile
|
266
283
|
- lib/examples/sidekiq_logster_reporter.rb
|
267
284
|
- lib/logster.rb
|
268
285
|
- lib/logster/base_store.rb
|
@@ -286,6 +303,9 @@ files:
|
|
286
303
|
- lib/logster/version.rb
|
287
304
|
- lib/logster/web.rb
|
288
305
|
- logster.gemspec
|
306
|
+
- test/dummy/config/application.rb
|
307
|
+
- test/dummy/config/boot.rb
|
308
|
+
- test/dummy/config/environment.rb
|
289
309
|
- test/examples/test_sidekiq_reporter_example.rb
|
290
310
|
- test/fake_data/Gemfile
|
291
311
|
- test/fake_data/generate.rb
|
@@ -299,6 +319,7 @@ files:
|
|
299
319
|
- test/logster/test_logger.rb
|
300
320
|
- test/logster/test_message.rb
|
301
321
|
- test/logster/test_pattern.rb
|
322
|
+
- test/logster/test_railtie.rb
|
302
323
|
- test/logster/test_redis_rate_limiter.rb
|
303
324
|
- test/logster/test_redis_store.rb
|
304
325
|
- test/test_helper.rb
|
@@ -327,6 +348,9 @@ signing_key:
|
|
327
348
|
specification_version: 4
|
328
349
|
summary: UI for viewing logs in Rack
|
329
350
|
test_files:
|
351
|
+
- test/dummy/config/application.rb
|
352
|
+
- test/dummy/config/boot.rb
|
353
|
+
- test/dummy/config/environment.rb
|
330
354
|
- test/examples/test_sidekiq_reporter_example.rb
|
331
355
|
- test/fake_data/Gemfile
|
332
356
|
- test/fake_data/generate.rb
|
@@ -340,6 +364,7 @@ test_files:
|
|
340
364
|
- test/logster/test_logger.rb
|
341
365
|
- test/logster/test_message.rb
|
342
366
|
- test/logster/test_pattern.rb
|
367
|
+
- test/logster/test_railtie.rb
|
343
368
|
- test/logster/test_redis_rate_limiter.rb
|
344
369
|
- test/logster/test_redis_store.rb
|
345
370
|
- test/test_helper.rb
|