logjam_agent 0.25.3 → 0.26.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 +3 -0
- data/lib/logjam_agent/amqp_forwarder.rb +1 -0
- data/lib/logjam_agent/railtie.rb +8 -0
- data/lib/logjam_agent/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 681026c8e74ca725274df2f2424eddef631f7523
|
4
|
+
data.tar.gz: 2bef380e6af893ddd67f076d3d460030ed0afaaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5454182e1fb4ae45087f8427f723766e698bacb81225f0ccfd6454543518ee769ee2b768a6ac99aa98118145236ae54f6a3e4bc657654f080c97387ed902bad6
|
7
|
+
data.tar.gz: 33ad233a9ac350f2a9415a6cc70715ad08a741662d4625f7e57049b8909c7d7112836cb973afe692e46c3ed2eb099f659eb1ea8f37fffb18605182bad3ec19f3
|
data/README.md
CHANGED
@@ -84,6 +84,10 @@ 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 paremters and envronment variables sent to
|
88
|
+
# logjam. Defaults to 1024.
|
89
|
+
# self.max_logged_param_size = 1024
|
90
|
+
|
87
91
|
# Configure maximum log line length. Defaults to 2048.
|
88
92
|
# This setting only applies to the lines sent with the request.
|
89
93
|
self.max_line_length = 2048
|
data/lib/logjam_agent.rb
CHANGED
@@ -152,6 +152,9 @@ module LogjamAgent
|
|
152
152
|
mattr_accessor :log_device_ignored_lines
|
153
153
|
self.log_device_ignored_lines = nil
|
154
154
|
|
155
|
+
mattr_accessor :max_logged_param_size
|
156
|
+
self.max_logged_param_size = 1024
|
157
|
+
|
155
158
|
mattr_accessor :max_line_length
|
156
159
|
self.max_line_length = 2048
|
157
160
|
|
data/lib/logjam_agent/railtie.rb
CHANGED
@@ -147,6 +147,14 @@ module LogjamAgent
|
|
147
147
|
ActiveSupport::Notifications.unsubscribe("render_partial.action_view")
|
148
148
|
ActiveSupport::Notifications.unsubscribe("render_collection.action_view")
|
149
149
|
end
|
150
|
+
|
151
|
+
max_size = LogjamAgent.max_logged_param_size
|
152
|
+
truncate_overlong_params = lambda { |key, value|
|
153
|
+
if value.is_a?(String) && value.bytesize > max_size
|
154
|
+
value[max_size..-1] = " ... [TRUNCATED]"
|
155
|
+
end
|
156
|
+
}
|
157
|
+
Rails.application.config.filter_parameters += [truncate_overlong_params]
|
150
158
|
end
|
151
159
|
end
|
152
160
|
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.
|
4
|
+
version: 0.26.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: 2017-
|
11
|
+
date: 2017-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
185
|
version: '0'
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project: logjam_agent
|
188
|
-
rubygems_version: 2.6.
|
188
|
+
rubygems_version: 2.6.14
|
189
189
|
signing_key:
|
190
190
|
specification_version: 4
|
191
191
|
summary: Logjam client library to be used with logjam
|