logjam_agent 0.26.0 → 0.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/logjam_agent.rb +11 -0
- data/lib/logjam_agent/railtie.rb +1 -1
- 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: c406e1b3b788a105fa0c9b4ce919faeb8272623a
|
4
|
+
data.tar.gz: 0a1c9c7237e517ca03cd3321574979a75837b36b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ae3c7df0a880a2125246176b97242c49e7b7a58aa7c218aa0349e5e19580f9dd321631c43aca5f315f903f2a481f037e79c6bb3923fb5014b37f8b23bd90189
|
7
|
+
data.tar.gz: 2de3c03b5071b6eb05252ef2723ec102b1e1d6c01b314a236783b99ee62c9be0613c1582f67d2a627828534fff06c1049bb6b650858fe812ff6cc7c863557e00
|
data/README.md
CHANGED
@@ -84,10 +84,14 @@ module LogjamAgent
|
|
84
84
|
# for example in a Rails before_action
|
85
85
|
# LogjamAgent.request.log_device_ignored_lines = /^\s*(?:Rendered|REDIS)/
|
86
86
|
|
87
|
-
# Configure maximum size of logged
|
87
|
+
# Configure maximum size of logged parameters and environment variables sent to
|
88
88
|
# logjam. Defaults to 1024.
|
89
89
|
# self.max_logged_param_size = 1024
|
90
90
|
|
91
|
+
# Configure maximum size of logged parameters and environment variables sent to
|
92
|
+
# logjam. Defaults to 1024 * 100.
|
93
|
+
# self.max_logged_cookie_size = 1024 * 100
|
94
|
+
|
91
95
|
# Configure maximum log line length. Defaults to 2048.
|
92
96
|
# This setting only applies to the lines sent with the request.
|
93
97
|
self.max_line_length = 2048
|
data/lib/logjam_agent.rb
CHANGED
@@ -155,6 +155,17 @@ module LogjamAgent
|
|
155
155
|
mattr_accessor :max_logged_param_size
|
156
156
|
self.max_logged_param_size = 1024
|
157
157
|
|
158
|
+
mattr_accessor :max_logged_cookie_size
|
159
|
+
self.max_logged_cookie_size = 1024 * 100
|
160
|
+
|
161
|
+
def self.max_logged_size_for(key)
|
162
|
+
if key == 'HTTP_COOKIE'.freeze
|
163
|
+
max_logged_cookie_size
|
164
|
+
else
|
165
|
+
max_logged_param_size
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
158
169
|
mattr_accessor :max_line_length
|
159
170
|
self.max_line_length = 2048
|
160
171
|
|
data/lib/logjam_agent/railtie.rb
CHANGED
@@ -148,8 +148,8 @@ module LogjamAgent
|
|
148
148
|
ActiveSupport::Notifications.unsubscribe("render_collection.action_view")
|
149
149
|
end
|
150
150
|
|
151
|
-
max_size = LogjamAgent.max_logged_param_size
|
152
151
|
truncate_overlong_params = lambda { |key, value|
|
152
|
+
max_size = LogjamAgent.max_logged_size_for(key)
|
153
153
|
if value.is_a?(String) && value.bytesize > max_size
|
154
154
|
value[max_size..-1] = " ... [TRUNCATED]"
|
155
155
|
end
|
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.26.
|
4
|
+
version: 0.26.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|