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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 681026c8e74ca725274df2f2424eddef631f7523
4
- data.tar.gz: 2bef380e6af893ddd67f076d3d460030ed0afaaa
3
+ metadata.gz: c406e1b3b788a105fa0c9b4ce919faeb8272623a
4
+ data.tar.gz: 0a1c9c7237e517ca03cd3321574979a75837b36b
5
5
  SHA512:
6
- metadata.gz: 5454182e1fb4ae45087f8427f723766e698bacb81225f0ccfd6454543518ee769ee2b768a6ac99aa98118145236ae54f6a3e4bc657654f080c97387ed902bad6
7
- data.tar.gz: 33ad233a9ac350f2a9415a6cc70715ad08a741662d4625f7e57049b8909c7d7112836cb973afe692e46c3ed2eb099f659eb1ea8f37fffb18605182bad3ec19f3
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 paremters and envronment variables sent to
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
@@ -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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.26.0"
2
+ VERSION = "0.26.1"
3
3
  end
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.0
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-05 00:00:00.000000000 Z
11
+ date: 2017-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake