lograge 0.4.0.pre2 → 0.4.0.pre4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lograge.rb +2 -2
- data/lib/lograge/formatters/key_value.rb +2 -3
- data/lib/lograge/formatters/l2met.rb +11 -3
- data/lib/lograge/formatters/ltsv.rb +2 -3
- data/lib/lograge/log_subscriber.rb +2 -2
- data/lib/lograge/version.rb +1 -1
- metadata +10 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a03da6b14fbcb0591f997e9adcffc2c446169f7e
|
4
|
+
data.tar.gz: c7dbbf521f4d1eaf06b13d8dc7c05a3cf27d078e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af7acb1a470cd0b8fbf34c983d24eca3e70ef84e14e9fb2d4ada57b00cf9f2c47991253cae9db3aab1a24194acb19079548c3d02797bf1825a1ba3f546edd78e
|
7
|
+
data.tar.gz: fea3feff626bd918c149bfc80ef2ee313cc885f28b5ca6c297123ef930c7b0b8e0d33444e288865db1548fcf46e664615232fe56cd8f422e2724844548ec32b5
|
data/lib/lograge.rb
CHANGED
@@ -62,8 +62,8 @@ module Lograge
|
|
62
62
|
|
63
63
|
def ignore_actions(actions)
|
64
64
|
ignore(lambda do |event|
|
65
|
-
params = event.payload
|
66
|
-
Array(actions).include?("#{params[
|
65
|
+
params = event.payload
|
66
|
+
Array(actions).include?("#{params[:controller]}##{params[:action]}")
|
67
67
|
end)
|
68
68
|
end
|
69
69
|
|
@@ -18,9 +18,8 @@ module Lograge
|
|
18
18
|
# Parsing this can be ambigious if the error messages contains
|
19
19
|
# a single quote
|
20
20
|
value = "'#{value}'"
|
21
|
-
|
22
|
-
|
23
|
-
value = Kernel.format('%.2f', value) if value.is_a? Float
|
21
|
+
elsif value.is_a? Float
|
22
|
+
value = Kernel.format('%.2f', value)
|
24
23
|
end
|
25
24
|
|
26
25
|
"#{key}=#{value}"
|
@@ -4,9 +4,17 @@ module Lograge
|
|
4
4
|
module Formatters
|
5
5
|
class L2met < KeyValue
|
6
6
|
L2MET_FIELDS = [
|
7
|
-
:method,
|
8
|
-
:
|
9
|
-
|
7
|
+
:method,
|
8
|
+
:path,
|
9
|
+
:format,
|
10
|
+
:source,
|
11
|
+
:status,
|
12
|
+
:error,
|
13
|
+
:duration,
|
14
|
+
:view,
|
15
|
+
:db,
|
16
|
+
:location
|
17
|
+
].freeze
|
10
18
|
|
11
19
|
def call(data)
|
12
20
|
super(modify_payload(data))
|
@@ -18,9 +18,8 @@ module Lograge
|
|
18
18
|
# Parsing this can be ambigious if the error messages contains
|
19
19
|
# a single quote
|
20
20
|
value = "'#{escape value}'"
|
21
|
-
|
22
|
-
|
23
|
-
value = Kernel.format('%.2f', value) if value.is_a? Float
|
21
|
+
elsif value.is_a? Float
|
22
|
+
value = Kernel.format('%.2f', value)
|
24
23
|
end
|
25
24
|
|
26
25
|
"#{key}:#{value}"
|
@@ -45,8 +45,8 @@ module Lograge
|
|
45
45
|
method: payload[:method],
|
46
46
|
path: extract_path(payload),
|
47
47
|
format: extract_format(payload),
|
48
|
-
controller: payload[:
|
49
|
-
action: payload[:
|
48
|
+
controller: payload[:controller],
|
49
|
+
action: payload[:action]
|
50
50
|
}
|
51
51
|
end
|
52
52
|
|
data/lib/lograge/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lograge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mathias Meyer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -31,28 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
34
|
+
version: 0.37.2
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.
|
42
|
-
- !ruby/object:Gem::Dependency
|
43
|
-
name: parser
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - '='
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 2.3.0.2
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - '='
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: 2.3.0.2
|
41
|
+
version: 0.37.2
|
56
42
|
- !ruby/object:Gem::Dependency
|
57
43
|
name: activesupport
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,7 +48,7 @@ dependencies:
|
|
62
48
|
version: '4'
|
63
49
|
- - "<="
|
64
50
|
- !ruby/object:Gem::Version
|
65
|
-
version: 5.0.0.
|
51
|
+
version: 5.0.0.beta4
|
66
52
|
type: :runtime
|
67
53
|
prerelease: false
|
68
54
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -72,7 +58,7 @@ dependencies:
|
|
72
58
|
version: '4'
|
73
59
|
- - "<="
|
74
60
|
- !ruby/object:Gem::Version
|
75
|
-
version: 5.0.0.
|
61
|
+
version: 5.0.0.beta4
|
76
62
|
- !ruby/object:Gem::Dependency
|
77
63
|
name: actionpack
|
78
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +68,7 @@ dependencies:
|
|
82
68
|
version: '4'
|
83
69
|
- - "<="
|
84
70
|
- !ruby/object:Gem::Version
|
85
|
-
version: 5.0.0.
|
71
|
+
version: 5.0.0.beta4
|
86
72
|
type: :runtime
|
87
73
|
prerelease: false
|
88
74
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -92,7 +78,7 @@ dependencies:
|
|
92
78
|
version: '4'
|
93
79
|
- - "<="
|
94
80
|
- !ruby/object:Gem::Version
|
95
|
-
version: 5.0.0.
|
81
|
+
version: 5.0.0.beta4
|
96
82
|
- !ruby/object:Gem::Dependency
|
97
83
|
name: railties
|
98
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,7 +88,7 @@ dependencies:
|
|
102
88
|
version: '4'
|
103
89
|
- - "<="
|
104
90
|
- !ruby/object:Gem::Version
|
105
|
-
version: 5.0.0.
|
91
|
+
version: 5.0.0.beta4
|
106
92
|
type: :runtime
|
107
93
|
prerelease: false
|
108
94
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -112,7 +98,7 @@ dependencies:
|
|
112
98
|
version: '4'
|
113
99
|
- - "<="
|
114
100
|
- !ruby/object:Gem::Version
|
115
|
-
version: 5.0.0.
|
101
|
+
version: 5.0.0.beta4
|
116
102
|
description: Tame Rails' multi-line logging into a single line per request
|
117
103
|
email:
|
118
104
|
- meyer@paperplanes.de
|