rails-pretty-logger 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/rails/pretty/logger/dashboards_helper.rb +13 -1
- data/app/views/rails/pretty/logger/dashboards/logs.html.erb +1 -3
- data/app/views/rails/pretty/logger/hourly_logs/logs.html.erb +1 -3
- data/config/routes.rb +2 -0
- data/lib/rails/pretty/logger/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23827aaf96db38b3eb70627797a5289d4c32a80a
|
4
|
+
data.tar.gz: 5cababcc32c82eeaa43b2d8c92018782ee80c135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9daf92873de7bd2145b2d04cdc7b429784cfb9895948a425e1b742f8a3f7b332eb6007869167b4615309f9354ad4bcf6be0f4e60cd42e68ff284c9d2b9e667a7
|
7
|
+
data.tar.gz: cd4fbee9be448304722a04d3f30dcb79b40404c2c9ef5ec9716412c941b775e8dcfcd46e95ef9f28e9b1b3074dd56e2190176088ec940c8965e318efd3618d9a
|
@@ -2,7 +2,11 @@ module Rails::Pretty::Logger
|
|
2
2
|
module DashboardsHelper
|
3
3
|
def check_highlight(line)
|
4
4
|
return "<div class='highlight'>#{line.remove('[HIGHLIGHT]')}</div>".html_safe if line.include?("[HIGHLIGHT]")
|
5
|
-
line
|
5
|
+
if line.include?("Parameters:")
|
6
|
+
parse_parameters(line)
|
7
|
+
else
|
8
|
+
line
|
9
|
+
end
|
6
10
|
end
|
7
11
|
|
8
12
|
def time_now
|
@@ -34,5 +38,13 @@ module Rails::Pretty::Logger
|
|
34
38
|
def check_rails_version
|
35
39
|
Rails::VERSION::STRING[0..2].to_f < 5.2
|
36
40
|
end
|
41
|
+
|
42
|
+
def parse_parameters(line)
|
43
|
+
parameters = line[line.index("Parameters:") + 12 ..line.length]
|
44
|
+
hash = JSON.parse parameters.gsub('=>', ':')
|
45
|
+
h = hash.reduce("<strong> Parameters: </strong> <br/> ") {|memo, (k,v)| memo += "<strong> #{k}: </strong> #{v}, "}
|
46
|
+
h.html_safe
|
47
|
+
end
|
48
|
+
|
37
49
|
end
|
38
50
|
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-pretty-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cem
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -59,8 +59,8 @@ dependencies:
|
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.6'
|
62
|
-
description:
|
63
|
-
add hourly rotation if
|
62
|
+
description: Check and search logs from dashboard, use hightlight to spot easily,
|
63
|
+
add hourly rotation if needed.
|
64
64
|
email:
|
65
65
|
- cbaykam@gmail.com
|
66
66
|
- mehmetcelik4@gmail.com
|