logjam_agent 0.13.3 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/logjam_agent.rb +10 -1
- data/lib/logjam_agent/request.rb +1 -0
- data/lib/logjam_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5957018a83ecf2126ec5b5b9ac939268ca0d3b57
|
4
|
+
data.tar.gz: 67dfeb8457026181730c98ed1013762e57ea483c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e4ea8eab816b52fbc114f025ed486f31615c225825a12e01e53a7b57c36c7937d8505ba96b3f65b7ee9f8106930d46dfc6c8bee06beed32bdb2078623ff28b0
|
7
|
+
data.tar.gz: 91aa0893b909026b8136d46f634f46a83df2502073bb09f9a650e281aaecb1fa385afc84f13bcd904754a33dcf3efcec0193a621e2a8dec40eb035ed604ca965
|
data/README.md
CHANGED
@@ -56,6 +56,10 @@ module LogjamAgent
|
|
56
56
|
# They will still be sent to the logjam server. Defaults to nil.
|
57
57
|
self.log_device_ignored_lines = /^\s*Rendered/
|
58
58
|
|
59
|
+
# It is also possible to ovveride this on a per request basis,
|
60
|
+
# for example in a Rails before_action
|
61
|
+
# LogjamAgent.request.log_device_ignored_lines = /^\s*(?:Rendered|REDIS)/
|
62
|
+
|
59
63
|
# Configure maximum log line length. Defaults to 2048.
|
60
64
|
# This setting only applies to the lines sent with the request.
|
61
65
|
self.max_line_length = 2048
|
data/lib/logjam_agent.rb
CHANGED
@@ -124,7 +124,11 @@ module LogjamAgent
|
|
124
124
|
self.max_bytes_all_lines = 1024 * 1024
|
125
125
|
|
126
126
|
def self.log_to_log_device?(msg)
|
127
|
-
|
127
|
+
if override_global_ignore_lines?
|
128
|
+
msg !~ request.log_device_ignored_lines
|
129
|
+
else
|
130
|
+
!(log_device_ignored_lines && msg =~ log_device_ignored_lines)
|
131
|
+
end
|
128
132
|
rescue
|
129
133
|
true
|
130
134
|
end
|
@@ -210,4 +214,9 @@ module LogjamAgent
|
|
210
214
|
def self.forwarder
|
211
215
|
@forwarder ||= Forwarders.get(application_name, environment_name)
|
212
216
|
end
|
217
|
+
|
218
|
+
def self.override_global_ignore_lines?
|
219
|
+
request && request.log_device_ignored_lines
|
220
|
+
end
|
221
|
+
|
213
222
|
end
|
data/lib/logjam_agent/request.rb
CHANGED
data/lib/logjam_agent/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logjam_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|