logjam_agent 0.38.5 → 0.39.0
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: 3d7b4025afcfb74c8ddface95761561c9afe00438b1efde33007d895c3082ebd
|
4
|
+
data.tar.gz: cd945e945bb82cef9d7021661224abe63ac63d655ae7f4c00523df545c9d1dd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f926c57ee8e5498c626db610c9191f38fbdc851753e2aa19772ce641d7e6cab4300941bec45ee810ac186a991ea094d1d0aee6c803b33cb8937bf7595f4a3d9d
|
7
|
+
data.tar.gz: 98c2af2e48e1fe938472f1f1392dbe74e5b20f98c93629ba482e3adaa3b362ffc7ec7201782e4005a015618431e970c97994696e6e8ba5c89947c99e019ff68c
|
@@ -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|
|
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.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: 2023-
|
11
|
+
date: 2023-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|