logjam_agent 0.38.5 → 0.39.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f186ba84a9bc5d93776c0d24b140736439fbc0f29eebe2afbeb9401c22eb0987
|
4
|
+
data.tar.gz: 7ef52541666f638caa3ffd2798f2da95128f720b9df27c8acf6a37ade5666c08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3a424872649058f48a09babd30da5abac2e013db6afe50fd9284bb51e313fe6ab9d313c47f7aee40e097c64b297d533d209d3f118273fc1980e2f4e6f08f138
|
7
|
+
data.tar.gz: 4003a735b587bd1e6a69cd2f6c671ce86f70c609269dd273fb8859ea0a9795cf5264421d088b842b5d357f50c090360d2530ae092cf05a639c17e808465ae6aa
|
@@ -13,13 +13,16 @@ class LogjamAgent::ConsoleFormatter < Logger::Formatter
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
logger
|
22
|
-
|
16
|
+
if Gem::Version.new(ActiveSupport::VERSION::STRING) < Gem::Version.new("7.1.0")
|
17
|
+
|
18
|
+
class ActiveSupport::Logger
|
19
|
+
class << self
|
20
|
+
alias_method :original_broadcast, :broadcast
|
21
|
+
def broadcast(logger)
|
22
|
+
logger.formatter = LogjamAgent::ConsoleFormatter.new
|
23
|
+
logger.formatter.extend(ActiveSupport::TaggedLogging::Formatter)
|
24
|
+
original_broadcast(logger)
|
25
|
+
end
|
23
26
|
end
|
24
27
|
end
|
25
28
|
end
|
@@ -12,6 +12,7 @@ module LogjamAgent
|
|
12
12
|
@asset_prefix = Rails.application.config.assets.prefix rescue "---"
|
13
13
|
@ignore_asset_requests = LogjamAgent.ignore_asset_requests
|
14
14
|
@ignored_request_urls = LogjamAgent.ignored_request_urls
|
15
|
+
@use_to_default_s = Gem::Version.new(ActiveSupport::VERSION::STRING) < Gem::Version.new("7.1.0")
|
15
16
|
end
|
16
17
|
|
17
18
|
def call(env)
|
@@ -123,7 +124,8 @@ module LogjamAgent
|
|
123
124
|
logjam_fields.merge!(extract_request_info(request))
|
124
125
|
|
125
126
|
LogjamAgent.logjam_only do
|
126
|
-
|
127
|
+
started_at_str = @use_to_default_s ? start_time.to_default_s : start_time.to_s
|
128
|
+
info "Started #{request.request_method} \"#{path}\" for #{ip} at #{started_at_str}" unless logjam_request.ignored?(:asset)
|
127
129
|
end
|
128
130
|
if spoofed
|
129
131
|
error spoofed
|
@@ -10,6 +10,7 @@ module ActionController #:nodoc:
|
|
10
10
|
params = payload[:params].except(*INTERNAL_PARAMS)
|
11
11
|
format = payload[:format]
|
12
12
|
format = format.to_s.upcase if format.is_a?(Symbol)
|
13
|
+
format = "*/*" if format.nil?
|
13
14
|
|
14
15
|
controller = payload[:controller]
|
15
16
|
action = payload[:action]
|
data/lib/logjam_agent/railtie.rb
CHANGED
@@ -33,6 +33,19 @@ module LogjamAgent
|
|
33
33
|
)
|
34
34
|
LogjamAgent.logger = logger
|
35
35
|
end
|
36
|
+
|
37
|
+
if Gem::Version.new(Rails::VERSION::STRING) >= Gem::Version.new("7.1.0")
|
38
|
+
unless Rails.logger.is_a?(ActiveSupport::BroadcastLogger)
|
39
|
+
broadcast_logger = ActiveSupport::BroadcastLogger.new(Rails.logger)
|
40
|
+
broadcast_logger.formatter = Rails.logger.formatter
|
41
|
+
Rails.logger = broadcast_logger
|
42
|
+
LogjamAgent.logger = logger
|
43
|
+
end
|
44
|
+
|
45
|
+
unless app.config.consider_all_requests_local
|
46
|
+
Rails.error.logger = Rails.logger
|
47
|
+
end
|
48
|
+
end
|
36
49
|
end
|
37
50
|
|
38
51
|
initializer "logjam_agent", :after => "time_bandits" do |app|
|
@@ -127,11 +140,21 @@ module LogjamAgent
|
|
127
140
|
trace = wrapper.application_trace
|
128
141
|
trace = wrapper.framework_trace if trace.empty?
|
129
142
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
143
|
+
if Gem::Version.new(Rails::VERSION::STRING) >= Gem::Version.new("7.1.0")
|
144
|
+
Rails.application.deprecators.silence do
|
145
|
+
parts = [ "#{exception.class} (#{exception.message})" ]
|
146
|
+
parts.concat exception.annoted_source_code if exception.respond_to?(:annoted_source_code)
|
147
|
+
parts.concat trace
|
148
|
+
logger.fatal parts.join("\n ")
|
149
|
+
end
|
150
|
+
else
|
151
|
+
ActiveSupport::Deprecation.silence do
|
152
|
+
parts = [ "#{exception.class} (#{exception.message})" ]
|
153
|
+
parts.concat exception.annoted_source_code if exception.respond_to?(:annoted_source_code)
|
154
|
+
parts.concat trace
|
155
|
+
logger.fatal parts.join("\n ")
|
156
|
+
end
|
157
|
+
|
135
158
|
end
|
136
159
|
end
|
137
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.39.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:
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.5.11
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Logjam client library to be used with logjam
|