lograge 0.11.2 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/lib/lograge/formatters/cee.rb +2 -0
- data/lib/lograge/formatters/graylog2.rb +6 -14
- data/lib/lograge/formatters/helpers/method_and_path.rb +2 -0
- data/lib/lograge/formatters/json.rb +2 -0
- data/lib/lograge/formatters/key_value.rb +3 -1
- data/lib/lograge/formatters/key_value_deep.rb +42 -0
- data/lib/lograge/formatters/l2met.rb +17 -15
- data/lib/lograge/formatters/lines.rb +2 -0
- data/lib/lograge/formatters/logstash.rb +2 -0
- data/lib/lograge/formatters/ltsv.rb +3 -1
- data/lib/lograge/formatters/raw.rb +2 -0
- data/lib/lograge/log_subscribers/action_cable.rb +6 -4
- data/lib/lograge/log_subscribers/action_controller.rb +2 -0
- data/lib/lograge/log_subscribers/base.rb +16 -5
- data/lib/lograge/ordered_options.rb +3 -0
- data/lib/lograge/rails_ext/action_cable/channel/base.rb +9 -14
- data/lib/lograge/rails_ext/action_cable/connection/base.rb +9 -30
- data/lib/lograge/rails_ext/action_cable/server/base.rb +2 -0
- data/lib/lograge/rails_ext/rack/logger.rb +9 -4
- data/lib/lograge/railtie.rb +6 -0
- data/lib/lograge/silent_logger.rb +5 -5
- data/lib/lograge/version.rb +3 -1
- data/lib/lograge.rb +33 -7
- metadata +115 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61fb6a597eb84cb10c97a1155d5dc983811c159fecdc00625db65fb46b3cf693
|
|
4
|
+
data.tar.gz: da3bfa1e8eaa35ad80caa7c743f826e7560fc8961c19f5fe342cde8fb0a830cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fe3ff2a303961c236c2407edfd585ffcffe2c5026453d497a95d731a81769e92e5814fcfbaa5c4d2e442b2b8112d597874ca4c64f9045ec8c0415acc223db60
|
|
7
|
+
data.tar.gz: 537eae531458214b65cc3776e959a6c592bfcef17803421335d52b63b021172c62bf1f2da2b9218a4b47f1a2a00dca3945a3b3e5e7fd324744aa7be6427aaeee
|
data/LICENSE.txt
CHANGED
|
@@ -1,27 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Lograge
|
|
2
4
|
module Formatters
|
|
3
5
|
class Graylog2
|
|
4
6
|
include Lograge::Formatters::Helpers::MethodAndPath
|
|
5
7
|
|
|
6
8
|
def call(data)
|
|
7
|
-
# Cloning because we don't want to mess with the original when mutating keys.
|
|
8
|
-
data_clone = data.clone
|
|
9
|
-
|
|
10
|
-
base = {
|
|
11
|
-
short_message: short_message(data_clone)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
9
|
# Add underscore to every key to follow GELF additional field syntax.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
data_clone.merge(base)
|
|
10
|
+
data.transform_keys { |k| underscore_prefix(k) }.merge(
|
|
11
|
+
short_message: short_message(data)
|
|
12
|
+
)
|
|
21
13
|
end
|
|
22
14
|
|
|
23
15
|
def underscore_prefix(key)
|
|
24
|
-
"_#{key}"
|
|
16
|
+
:"_#{key}"
|
|
25
17
|
end
|
|
26
18
|
|
|
27
19
|
def short_message(data)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Lograge
|
|
2
4
|
module Formatters
|
|
3
5
|
class KeyValue
|
|
@@ -19,7 +21,7 @@ module Lograge
|
|
|
19
21
|
|
|
20
22
|
def parse_value(key, value)
|
|
21
23
|
# Exactly preserve the previous output
|
|
22
|
-
# Parsing this can be
|
|
24
|
+
# Parsing this can be ambiguous if the error messages contains
|
|
23
25
|
# a single quote
|
|
24
26
|
return "'#{value}'" if key == :error
|
|
25
27
|
return Kernel.format('%.2f', value) if value.is_a? Float
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Lograge
|
|
4
|
+
module Formatters
|
|
5
|
+
class KeyValueDeep < KeyValue
|
|
6
|
+
def call(data)
|
|
7
|
+
super(flatten_keys(data))
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
protected
|
|
11
|
+
|
|
12
|
+
def flatten_keys(data, prefix = '')
|
|
13
|
+
return flatten_object(data, prefix) if [Hash, Array].include? data.class
|
|
14
|
+
|
|
15
|
+
data
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def flatten_object(data, prefix)
|
|
19
|
+
result = {}
|
|
20
|
+
loop_on_object(data) do |key, value|
|
|
21
|
+
key = "#{prefix}_#{key}" unless prefix.empty?
|
|
22
|
+
if [Hash, Array].include? value.class
|
|
23
|
+
result.merge!(flatten_keys(value, key))
|
|
24
|
+
else
|
|
25
|
+
result[key] = value
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
result
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def loop_on_object(data, &block)
|
|
32
|
+
if data.instance_of? Array
|
|
33
|
+
data.each_with_index do |value, index|
|
|
34
|
+
yield index, value
|
|
35
|
+
end
|
|
36
|
+
return
|
|
37
|
+
end
|
|
38
|
+
data.each(&block)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'lograge/formatters/key_value'
|
|
2
4
|
|
|
3
5
|
module Lograge
|
|
4
6
|
module Formatters
|
|
5
7
|
class L2met < KeyValue
|
|
6
|
-
L2MET_FIELDS = [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
L2MET_FIELDS = %i[
|
|
9
|
+
method
|
|
10
|
+
path
|
|
11
|
+
format
|
|
12
|
+
source
|
|
13
|
+
status
|
|
14
|
+
error
|
|
15
|
+
duration
|
|
16
|
+
view
|
|
17
|
+
db
|
|
18
|
+
location
|
|
17
19
|
].freeze
|
|
18
20
|
|
|
19
|
-
UNWANTED_FIELDS = [
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
UNWANTED_FIELDS = %i[
|
|
22
|
+
controller
|
|
23
|
+
action
|
|
22
24
|
].freeze
|
|
23
25
|
|
|
24
26
|
def call(data)
|
|
@@ -38,7 +40,7 @@ module Lograge
|
|
|
38
40
|
def format(key, value)
|
|
39
41
|
key = "measure#page.#{key}" if value.is_a?(Float)
|
|
40
42
|
|
|
41
|
-
super
|
|
43
|
+
super
|
|
42
44
|
end
|
|
43
45
|
|
|
44
46
|
def modify_payload(data)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Lograge
|
|
2
4
|
module Formatters
|
|
3
5
|
class LTSV
|
|
@@ -15,7 +17,7 @@ module Lograge
|
|
|
15
17
|
def format(key, value)
|
|
16
18
|
if key == :error
|
|
17
19
|
# Exactly preserve the previous output
|
|
18
|
-
# Parsing this can be
|
|
20
|
+
# Parsing this can be ambiguous if the error messages contains
|
|
19
21
|
# a single quote
|
|
20
22
|
value = "'#{escape value}'"
|
|
21
23
|
elsif value.is_a? Float
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Lograge
|
|
2
4
|
module LogSubscribers
|
|
3
5
|
class ActionCable < Base
|
|
4
|
-
%i
|
|
6
|
+
%i[perform_action subscribe unsubscribe connect disconnect].each do |method_name|
|
|
5
7
|
define_method(method_name) do |event|
|
|
6
8
|
process_main_event(event)
|
|
7
9
|
end
|
|
@@ -11,9 +13,9 @@ module Lograge
|
|
|
11
13
|
|
|
12
14
|
def initial_data(payload)
|
|
13
15
|
{
|
|
14
|
-
method:
|
|
15
|
-
path:
|
|
16
|
-
format:
|
|
16
|
+
method: nil,
|
|
17
|
+
path: nil,
|
|
18
|
+
format: nil,
|
|
17
19
|
params: payload[:data],
|
|
18
20
|
controller: payload[:channel_class] || payload[:connection_class],
|
|
19
21
|
action: payload[:action]
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'json'
|
|
2
4
|
require 'action_pack'
|
|
5
|
+
require 'active_support'
|
|
3
6
|
require 'active_support/core_ext/class/attribute'
|
|
4
7
|
require 'active_support/log_subscriber'
|
|
5
8
|
require 'request_store'
|
|
@@ -26,14 +29,15 @@ module Lograge
|
|
|
26
29
|
def extract_request(event, payload)
|
|
27
30
|
data = initial_data(payload)
|
|
28
31
|
data.merge!(extract_status(payload))
|
|
32
|
+
data.merge!(extract_allocations(event))
|
|
29
33
|
data.merge!(extract_runtimes(event, payload))
|
|
30
34
|
data.merge!(extract_location)
|
|
31
35
|
data.merge!(extract_unpermitted_params)
|
|
32
36
|
data.merge!(custom_options(event))
|
|
33
37
|
end
|
|
34
38
|
|
|
35
|
-
%i
|
|
36
|
-
extract_location extract_unpermitted_params
|
|
39
|
+
%i[initial_data extract_status extract_runtimes
|
|
40
|
+
extract_location extract_unpermitted_params].each do |method_name|
|
|
37
41
|
define_method(method_name) { |*_arg| {} }
|
|
38
42
|
end
|
|
39
43
|
|
|
@@ -52,9 +56,16 @@ module Lograge
|
|
|
52
56
|
0
|
|
53
57
|
end
|
|
54
58
|
|
|
55
|
-
def get_error_status_code(
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
def get_error_status_code(exception_class_name)
|
|
60
|
+
ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def extract_allocations(event)
|
|
64
|
+
if (allocations = event.respond_to?(:allocations) && event.allocations)
|
|
65
|
+
{ allocations: allocations }
|
|
66
|
+
else
|
|
67
|
+
{}
|
|
68
|
+
end
|
|
58
69
|
end
|
|
59
70
|
|
|
60
71
|
def custom_options(event)
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
module Channel
|
|
3
|
-
class Base
|
|
4
|
-
def subscribe_to_channel
|
|
5
|
-
ActiveSupport::Notifications.instrument('subscribe.action_cable', notification_payload('subscribe')) do
|
|
6
|
-
run_callbacks :subscribe do
|
|
7
|
-
subscribed
|
|
8
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
module Lograge
|
|
4
|
+
module ActionCable
|
|
5
|
+
module ChannelInstrumentation
|
|
6
|
+
def subscribe_to_channel
|
|
7
|
+
ActiveSupport::Notifications.instrument('subscribe.action_cable', notification_payload('subscribe')) { super }
|
|
13
8
|
end
|
|
14
9
|
|
|
15
10
|
def unsubscribe_from_channel
|
|
16
11
|
ActiveSupport::Notifications.instrument('unsubscribe.action_cable', notification_payload('unsubscribe')) do
|
|
17
|
-
|
|
18
|
-
unsubscribed
|
|
19
|
-
end
|
|
12
|
+
super
|
|
20
13
|
end
|
|
21
14
|
end
|
|
22
15
|
|
|
@@ -28,3 +21,5 @@ module ActionCable
|
|
|
28
21
|
end
|
|
29
22
|
end
|
|
30
23
|
end
|
|
24
|
+
|
|
25
|
+
ActionCable::Channel::Base.prepend(Lograge::ActionCable::ChannelInstrumentation)
|
|
@@ -1,42 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
module Connection
|
|
3
|
-
class Base
|
|
4
|
-
# rubocop:disable Metrics/MethodLength
|
|
5
|
-
def handle_open
|
|
6
|
-
ActiveSupport::Notifications.instrument('connect.action_cable', notification_payload('connect')) do
|
|
7
|
-
begin
|
|
8
|
-
@protocol = websocket.protocol
|
|
9
|
-
connect if respond_to?(:connect)
|
|
10
|
-
subscribe_to_internal_channel
|
|
11
|
-
send_welcome_message
|
|
1
|
+
# frozen_string_literal: true
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
end
|
|
3
|
+
module Lograge
|
|
4
|
+
module ActionCable
|
|
5
|
+
module ConnectionInstrumentation
|
|
6
|
+
def handle_open
|
|
7
|
+
ActiveSupport::Notifications.instrument('connect.action_cable', notification_payload('connect')) { super }
|
|
19
8
|
end
|
|
20
|
-
# rubocop:enable Metrics/MethodLength
|
|
21
9
|
|
|
22
10
|
def handle_close
|
|
23
|
-
ActiveSupport::Notifications.instrument('disconnect.action_cable', notification_payload('disconnect'))
|
|
24
|
-
logger.info finished_request_message if Lograge.lograge_config.keep_original_rails_log
|
|
25
|
-
|
|
26
|
-
server.remove_connection(self)
|
|
27
|
-
|
|
28
|
-
subscriptions.unsubscribe_from_all
|
|
29
|
-
unsubscribe_from_internal_channel
|
|
30
|
-
|
|
31
|
-
disconnect if respond_to?(:disconnect)
|
|
32
|
-
end
|
|
11
|
+
ActiveSupport::Notifications.instrument('disconnect.action_cable', notification_payload('disconnect')) { super }
|
|
33
12
|
end
|
|
34
13
|
|
|
35
|
-
private
|
|
36
|
-
|
|
37
14
|
def notification_payload(method_name)
|
|
38
15
|
{ connection_class: self.class.name, action: method_name, data: request.params }
|
|
39
16
|
end
|
|
40
17
|
end
|
|
41
18
|
end
|
|
42
19
|
end
|
|
20
|
+
|
|
21
|
+
ActionCable::Connection::Base.prepend(Lograge::ActionCable::ConnectionInstrumentation)
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'active_support'
|
|
1
4
|
require 'active_support/concern'
|
|
2
5
|
require 'rails/rack/logger'
|
|
3
6
|
|
|
@@ -9,17 +12,19 @@ module Rails
|
|
|
9
12
|
# that say:
|
|
10
13
|
# Started GET / for 192.168.2.1...
|
|
11
14
|
class Logger
|
|
12
|
-
# Overwrites Rails
|
|
15
|
+
# Overwrites Rails code that logs new requests
|
|
13
16
|
def call_app(*args)
|
|
14
17
|
env = args.last
|
|
15
|
-
@app.call(env)
|
|
18
|
+
status, headers, body = @app.call(env)
|
|
19
|
+
# needs to have same return type as the Rails builtins being overridden, see https://github.com/roidrage/lograge/pull/333
|
|
20
|
+
# https://github.com/rails/rails/blob/be9d34b9bcb448b265114ebc28bef1a5b5e4c272/railties/lib/rails/rack/logger.rb#L37
|
|
21
|
+
[status, headers, ::Rack::BodyProxy.new(body) {}] # rubocop:disable Lint/EmptyBlock
|
|
16
22
|
ensure
|
|
17
23
|
ActiveSupport::LogSubscriber.flush_all!
|
|
18
24
|
end
|
|
19
25
|
|
|
20
26
|
# Overwrites Rails 3.0/3.1 code that logs new requests
|
|
21
|
-
def before_dispatch(_env)
|
|
22
|
-
end
|
|
27
|
+
def before_dispatch(_env); end
|
|
23
28
|
end
|
|
24
29
|
end
|
|
25
30
|
end
|
data/lib/lograge/railtie.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'rails/railtie'
|
|
2
4
|
require 'action_view/log_subscriber'
|
|
3
5
|
require 'action_controller/log_subscriber'
|
|
@@ -7,6 +9,10 @@ module Lograge
|
|
|
7
9
|
config.lograge = Lograge::OrderedOptions.new
|
|
8
10
|
config.lograge.enabled = false
|
|
9
11
|
|
|
12
|
+
initializer :deprecator do |app|
|
|
13
|
+
app.deprecators[:lograge] = Lograge.deprecator if app.respond_to?(:deprecators)
|
|
14
|
+
end
|
|
15
|
+
|
|
10
16
|
config.after_initialize do |app|
|
|
11
17
|
Lograge.setup(app) if app.config.lograge.enabled
|
|
12
18
|
end
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'delegate'
|
|
4
|
+
|
|
1
5
|
module Lograge
|
|
2
6
|
class SilentLogger < SimpleDelegator
|
|
3
|
-
|
|
4
|
-
super
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
%i(debug info warn error fatal unknown).each do |method_name|
|
|
7
|
+
%i[debug info warn error fatal unknown].each do |method_name|
|
|
8
8
|
define_method(method_name) { |*_args| }
|
|
9
9
|
end
|
|
10
10
|
end
|
data/lib/lograge/version.rb
CHANGED
data/lib/lograge.rb
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'logger'
|
|
1
4
|
require 'lograge/version'
|
|
2
5
|
require 'lograge/formatters/helpers/method_and_path'
|
|
3
6
|
require 'lograge/formatters/cee'
|
|
4
7
|
require 'lograge/formatters/json'
|
|
5
8
|
require 'lograge/formatters/graylog2'
|
|
6
9
|
require 'lograge/formatters/key_value'
|
|
10
|
+
require 'lograge/formatters/key_value_deep'
|
|
7
11
|
require 'lograge/formatters/l2met'
|
|
8
12
|
require 'lograge/formatters/lines'
|
|
9
13
|
require 'lograge/formatters/logstash'
|
|
@@ -14,10 +18,10 @@ require 'lograge/log_subscribers/action_cable'
|
|
|
14
18
|
require 'lograge/log_subscribers/action_controller'
|
|
15
19
|
require 'lograge/silent_logger'
|
|
16
20
|
require 'lograge/ordered_options'
|
|
21
|
+
require 'active_support'
|
|
17
22
|
require 'active_support/core_ext/module/attribute_accessors'
|
|
18
23
|
require 'active_support/core_ext/string/inflections'
|
|
19
24
|
|
|
20
|
-
# rubocop:disable ModuleLength
|
|
21
25
|
module Lograge
|
|
22
26
|
module_function
|
|
23
27
|
|
|
@@ -116,14 +120,21 @@ module Lograge
|
|
|
116
120
|
def unsubscribe(component, subscriber)
|
|
117
121
|
events = subscriber.public_methods(false).reject { |method| method.to_s == 'call' }
|
|
118
122
|
events.each do |event|
|
|
119
|
-
|
|
120
|
-
if listener
|
|
121
|
-
ActiveSupport::Notifications.unsubscribe listener
|
|
122
|
-
end
|
|
123
|
+
Lograge.notification_listeners_for("#{event}.#{component}").each do |listener|
|
|
124
|
+
ActiveSupport::Notifications.unsubscribe listener if rails_log_subscriber?(listener, subscriber)
|
|
123
125
|
end
|
|
124
126
|
end
|
|
125
127
|
end
|
|
126
128
|
|
|
129
|
+
def rails_log_subscriber?(listener, subscriber)
|
|
130
|
+
delegate = listener.instance_variable_get('@delegate')
|
|
131
|
+
return true if delegate == subscriber
|
|
132
|
+
|
|
133
|
+
# Rails 7.1+ attaches a separate ActionView::LogSubscriber::Start listener
|
|
134
|
+
# alongside ActionView::LogSubscriber to log the start of template rendering.
|
|
135
|
+
defined?(ActionView::LogSubscriber::Start) && delegate.is_a?(ActionView::LogSubscriber::Start)
|
|
136
|
+
end
|
|
137
|
+
|
|
127
138
|
def setup(app)
|
|
128
139
|
self.application = app
|
|
129
140
|
disable_rack_cache_verbose_output
|
|
@@ -203,7 +214,7 @@ module Lograge
|
|
|
203
214
|
end
|
|
204
215
|
|
|
205
216
|
def rack_cache_hashlike?(app)
|
|
206
|
-
app.config.action_dispatch.rack_cache
|
|
217
|
+
app.config.action_dispatch.rack_cache&.respond_to?(:[]=)
|
|
207
218
|
end
|
|
208
219
|
private_class_method :rack_cache_hashlike?
|
|
209
220
|
|
|
@@ -214,7 +225,7 @@ module Lograge
|
|
|
214
225
|
|
|
215
226
|
legacy_log_format = lograge_config.log_format
|
|
216
227
|
warning = 'config.lograge.log_format is deprecated. Use config.lograge.formatter instead.'
|
|
217
|
-
|
|
228
|
+
deprecator.warn(warning, caller)
|
|
218
229
|
legacy_log_format = :key_value if legacy_log_format == :lograge
|
|
219
230
|
lograge_config.formatter = "Lograge::Formatters::#{legacy_log_format.to_s.classify}".constantize.new
|
|
220
231
|
end
|
|
@@ -222,6 +233,21 @@ module Lograge
|
|
|
222
233
|
def lograge_config
|
|
223
234
|
application.config.lograge
|
|
224
235
|
end
|
|
236
|
+
|
|
237
|
+
def deprecator
|
|
238
|
+
@deprecator ||= ActiveSupport::Deprecation.new('1.0', 'Lograge')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if ::ActiveSupport::VERSION::MAJOR >= 8 ||
|
|
242
|
+
(::ActiveSupport::VERSION::MAJOR >= 7 && ::ActiveSupport::VERSION::MINOR >= 1)
|
|
243
|
+
def notification_listeners_for(name)
|
|
244
|
+
ActiveSupport::Notifications.notifier.all_listeners_for(name)
|
|
245
|
+
end
|
|
246
|
+
else
|
|
247
|
+
def notification_listeners_for(name)
|
|
248
|
+
ActiveSupport::Notifications.notifier.listeners_for(name)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
225
251
|
end
|
|
226
252
|
|
|
227
253
|
require 'lograge/railtie' if defined?(Rails)
|
metadata
CHANGED
|
@@ -1,18 +1,46 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lograge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mathias Meyer
|
|
8
8
|
- Ben Lovell
|
|
9
|
-
|
|
9
|
+
- Michael Bianco
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
|
-
name:
|
|
15
|
+
name: base64
|
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
requirements:
|
|
18
|
+
- - ">="
|
|
19
|
+
- !ruby/object:Gem::Version
|
|
20
|
+
version: '0'
|
|
21
|
+
type: :development
|
|
22
|
+
prerelease: false
|
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
24
|
+
requirements:
|
|
25
|
+
- - ">="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: '0'
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: benchmark
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
- - ">="
|
|
33
|
+
- !ruby/object:Gem::Version
|
|
34
|
+
version: '0'
|
|
35
|
+
type: :development
|
|
36
|
+
prerelease: false
|
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
38
|
+
requirements:
|
|
39
|
+
- - ">="
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '0'
|
|
42
|
+
- !ruby/object:Gem::Dependency
|
|
43
|
+
name: bigdecimal
|
|
16
44
|
requirement: !ruby/object:Gem::Requirement
|
|
17
45
|
requirements:
|
|
18
46
|
- - ">="
|
|
@@ -25,22 +53,78 @@ dependencies:
|
|
|
25
53
|
- - ">="
|
|
26
54
|
- !ruby/object:Gem::Version
|
|
27
55
|
version: '0'
|
|
56
|
+
- !ruby/object:Gem::Dependency
|
|
57
|
+
name: mutex_m
|
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - ">="
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '0'
|
|
63
|
+
type: :development
|
|
64
|
+
prerelease: false
|
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - ">="
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '0'
|
|
70
|
+
- !ruby/object:Gem::Dependency
|
|
71
|
+
name: rdoc
|
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
|
73
|
+
requirements:
|
|
74
|
+
- - "<"
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '8'
|
|
77
|
+
type: :development
|
|
78
|
+
prerelease: false
|
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
+
requirements:
|
|
81
|
+
- - "<"
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: '8'
|
|
84
|
+
- !ruby/object:Gem::Dependency
|
|
85
|
+
name: rspec
|
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
|
87
|
+
requirements:
|
|
88
|
+
- - "~>"
|
|
89
|
+
- !ruby/object:Gem::Version
|
|
90
|
+
version: '3.1'
|
|
91
|
+
type: :development
|
|
92
|
+
prerelease: false
|
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
+
requirements:
|
|
95
|
+
- - "~>"
|
|
96
|
+
- !ruby/object:Gem::Version
|
|
97
|
+
version: '3.1'
|
|
28
98
|
- !ruby/object:Gem::Dependency
|
|
29
99
|
name: rubocop
|
|
30
100
|
requirement: !ruby/object:Gem::Requirement
|
|
31
101
|
requirements:
|
|
32
|
-
- -
|
|
102
|
+
- - "~>"
|
|
33
103
|
- !ruby/object:Gem::Version
|
|
34
|
-
version:
|
|
104
|
+
version: '1.23'
|
|
35
105
|
type: :development
|
|
36
106
|
prerelease: false
|
|
37
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
108
|
requirements:
|
|
39
|
-
- -
|
|
109
|
+
- - "~>"
|
|
40
110
|
- !ruby/object:Gem::Version
|
|
41
|
-
version:
|
|
111
|
+
version: '1.23'
|
|
42
112
|
- !ruby/object:Gem::Dependency
|
|
43
|
-
name:
|
|
113
|
+
name: simplecov
|
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
|
115
|
+
requirements:
|
|
116
|
+
- - "~>"
|
|
117
|
+
- !ruby/object:Gem::Version
|
|
118
|
+
version: '0.21'
|
|
119
|
+
type: :development
|
|
120
|
+
prerelease: false
|
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
122
|
+
requirements:
|
|
123
|
+
- - "~>"
|
|
124
|
+
- !ruby/object:Gem::Version
|
|
125
|
+
version: '0.21'
|
|
126
|
+
- !ruby/object:Gem::Dependency
|
|
127
|
+
name: actionpack
|
|
44
128
|
requirement: !ruby/object:Gem::Requirement
|
|
45
129
|
requirements:
|
|
46
130
|
- - ">="
|
|
@@ -54,7 +138,7 @@ dependencies:
|
|
|
54
138
|
- !ruby/object:Gem::Version
|
|
55
139
|
version: '4'
|
|
56
140
|
- !ruby/object:Gem::Dependency
|
|
57
|
-
name:
|
|
141
|
+
name: activesupport
|
|
58
142
|
requirement: !ruby/object:Gem::Requirement
|
|
59
143
|
requirements:
|
|
60
144
|
- - ">="
|
|
@@ -67,6 +151,20 @@ dependencies:
|
|
|
67
151
|
- - ">="
|
|
68
152
|
- !ruby/object:Gem::Version
|
|
69
153
|
version: '4'
|
|
154
|
+
- !ruby/object:Gem::Dependency
|
|
155
|
+
name: logger
|
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
|
157
|
+
requirements:
|
|
158
|
+
- - ">="
|
|
159
|
+
- !ruby/object:Gem::Version
|
|
160
|
+
version: '0'
|
|
161
|
+
type: :runtime
|
|
162
|
+
prerelease: false
|
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
164
|
+
requirements:
|
|
165
|
+
- - ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: '0'
|
|
70
168
|
- !ruby/object:Gem::Dependency
|
|
71
169
|
name: railties
|
|
72
170
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,6 +197,7 @@ description: Tame Rails' multi-line logging into a single line per request
|
|
|
99
197
|
email:
|
|
100
198
|
- meyer@paperplanes.de
|
|
101
199
|
- benjamin.lovell@gmail.com
|
|
200
|
+
- mike@mikebian.co
|
|
102
201
|
executables: []
|
|
103
202
|
extensions: []
|
|
104
203
|
extra_rdoc_files: []
|
|
@@ -110,6 +209,7 @@ files:
|
|
|
110
209
|
- lib/lograge/formatters/helpers/method_and_path.rb
|
|
111
210
|
- lib/lograge/formatters/json.rb
|
|
112
211
|
- lib/lograge/formatters/key_value.rb
|
|
212
|
+
- lib/lograge/formatters/key_value_deep.rb
|
|
113
213
|
- lib/lograge/formatters/l2met.rb
|
|
114
214
|
- lib/lograge/formatters/lines.rb
|
|
115
215
|
- lib/lograge/formatters/logstash.rb
|
|
@@ -129,8 +229,9 @@ files:
|
|
|
129
229
|
homepage: https://github.com/roidrage/lograge
|
|
130
230
|
licenses:
|
|
131
231
|
- MIT
|
|
132
|
-
metadata:
|
|
133
|
-
|
|
232
|
+
metadata:
|
|
233
|
+
rubygems_mfa_required: 'true'
|
|
234
|
+
changelog_uri: https://github.com/roidrage/lograge/blob/master/CHANGELOG.md
|
|
134
235
|
rdoc_options: []
|
|
135
236
|
require_paths:
|
|
136
237
|
- lib
|
|
@@ -138,16 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
138
239
|
requirements:
|
|
139
240
|
- - ">="
|
|
140
241
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: '
|
|
242
|
+
version: '2.5'
|
|
142
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
244
|
requirements:
|
|
144
245
|
- - ">="
|
|
145
246
|
- !ruby/object:Gem::Version
|
|
146
247
|
version: '0'
|
|
147
248
|
requirements: []
|
|
148
|
-
|
|
149
|
-
rubygems_version: 2.7.6
|
|
150
|
-
signing_key:
|
|
249
|
+
rubygems_version: 4.0.14
|
|
151
250
|
specification_version: 4
|
|
152
251
|
summary: Tame Rails' multi-line logging into a single line per request
|
|
153
252
|
test_files: []
|