lograge 0.11.2 → 0.15.0
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 +7 -5
- data/lib/lograge/version.rb +3 -1
- data/lib/lograge.rb +26 -7
- metadata +87 -16
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7a5c4ad171a2f28dcf7271eac87818900fac9c3f3a1cac94f3a15c7b0df90ba
|
|
4
|
+
data.tar.gz: b9ea79a6aff265e3e0c12a52b5e62ec05a4fe4cac8df1c1de9868ddccca0c278
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d39e78da6b73c9926721a7f121ed4a6697e3b89cc8e018d0d7d622ab205ea50374cf4b3390cea348bee12af380fe1c9985b1a26fb8b454df26cbb9b66da29ec
|
|
7
|
+
data.tar.gz: bbaacef289d4d2a0c710c186faeb6c0deca4d161d2ccbdb792c9ba3b0253e26e075f5de7a56b143bc37becb70d8f8abea0834278075b049a66e6269dfda7a9b3
|
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,11 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'delegate'
|
|
4
|
+
|
|
1
5
|
module Lograge
|
|
2
6
|
class SilentLogger < SimpleDelegator
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
# rubocop:disable Lint/EmptyBlock
|
|
8
9
|
define_method(method_name) { |*_args| }
|
|
10
|
+
# rubocop:enable Lint/EmptyBlock
|
|
9
11
|
end
|
|
10
12
|
end
|
|
11
13
|
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,11 @@ 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
|
|
25
|
+
# rubocop:disable Metrics/ModuleLength
|
|
21
26
|
module Lograge
|
|
22
27
|
module_function
|
|
23
28
|
|
|
@@ -116,10 +121,8 @@ module Lograge
|
|
|
116
121
|
def unsubscribe(component, subscriber)
|
|
117
122
|
events = subscriber.public_methods(false).reject { |method| method.to_s == 'call' }
|
|
118
123
|
events.each do |event|
|
|
119
|
-
|
|
120
|
-
if listener.instance_variable_get('@delegate') == subscriber
|
|
121
|
-
ActiveSupport::Notifications.unsubscribe listener
|
|
122
|
-
end
|
|
124
|
+
Lograge.notification_listeners_for("#{event}.#{component}").each do |listener|
|
|
125
|
+
ActiveSupport::Notifications.unsubscribe listener if listener.instance_variable_get('@delegate') == subscriber
|
|
123
126
|
end
|
|
124
127
|
end
|
|
125
128
|
end
|
|
@@ -203,7 +206,7 @@ module Lograge
|
|
|
203
206
|
end
|
|
204
207
|
|
|
205
208
|
def rack_cache_hashlike?(app)
|
|
206
|
-
app.config.action_dispatch.rack_cache
|
|
209
|
+
app.config.action_dispatch.rack_cache&.respond_to?(:[]=)
|
|
207
210
|
end
|
|
208
211
|
private_class_method :rack_cache_hashlike?
|
|
209
212
|
|
|
@@ -214,7 +217,7 @@ module Lograge
|
|
|
214
217
|
|
|
215
218
|
legacy_log_format = lograge_config.log_format
|
|
216
219
|
warning = 'config.lograge.log_format is deprecated. Use config.lograge.formatter instead.'
|
|
217
|
-
|
|
220
|
+
deprecator.warn(warning, caller)
|
|
218
221
|
legacy_log_format = :key_value if legacy_log_format == :lograge
|
|
219
222
|
lograge_config.formatter = "Lograge::Formatters::#{legacy_log_format.to_s.classify}".constantize.new
|
|
220
223
|
end
|
|
@@ -222,6 +225,22 @@ module Lograge
|
|
|
222
225
|
def lograge_config
|
|
223
226
|
application.config.lograge
|
|
224
227
|
end
|
|
228
|
+
|
|
229
|
+
def deprecator
|
|
230
|
+
@deprecator ||= ActiveSupport::Deprecation.new('1.0', 'Lograge')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if ::ActiveSupport::VERSION::MAJOR >= 8 ||
|
|
234
|
+
(::ActiveSupport::VERSION::MAJOR >= 7 && ::ActiveSupport::VERSION::MINOR >= 1)
|
|
235
|
+
def notification_listeners_for(name)
|
|
236
|
+
ActiveSupport::Notifications.notifier.all_listeners_for(name)
|
|
237
|
+
end
|
|
238
|
+
else
|
|
239
|
+
def notification_listeners_for(name)
|
|
240
|
+
ActiveSupport::Notifications.notifier.listeners_for(name)
|
|
241
|
+
end
|
|
242
|
+
end
|
|
225
243
|
end
|
|
244
|
+
# rubocop:enable Metrics/ModuleLength
|
|
226
245
|
|
|
227
246
|
require 'lograge/railtie' if defined?(Rails)
|
metadata
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lograge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.15.0
|
|
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
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
requirements:
|
|
18
18
|
- - ">="
|
|
@@ -25,22 +25,92 @@ dependencies:
|
|
|
25
25
|
- - ">="
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
27
|
version: '0'
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: bigdecimal
|
|
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: mutex_m
|
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '0'
|
|
49
|
+
type: :development
|
|
50
|
+
prerelease: false
|
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
52
|
+
requirements:
|
|
53
|
+
- - ">="
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: '0'
|
|
56
|
+
- !ruby/object:Gem::Dependency
|
|
57
|
+
name: rdoc
|
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
- - "<"
|
|
61
|
+
- !ruby/object:Gem::Version
|
|
62
|
+
version: '8'
|
|
63
|
+
type: :development
|
|
64
|
+
prerelease: false
|
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
+
requirements:
|
|
67
|
+
- - "<"
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '8'
|
|
70
|
+
- !ruby/object:Gem::Dependency
|
|
71
|
+
name: rspec
|
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
|
73
|
+
requirements:
|
|
74
|
+
- - "~>"
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '3.1'
|
|
77
|
+
type: :development
|
|
78
|
+
prerelease: false
|
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
80
|
+
requirements:
|
|
81
|
+
- - "~>"
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: '3.1'
|
|
28
84
|
- !ruby/object:Gem::Dependency
|
|
29
85
|
name: rubocop
|
|
30
86
|
requirement: !ruby/object:Gem::Requirement
|
|
31
87
|
requirements:
|
|
32
|
-
- -
|
|
88
|
+
- - "~>"
|
|
33
89
|
- !ruby/object:Gem::Version
|
|
34
|
-
version:
|
|
90
|
+
version: '1.23'
|
|
35
91
|
type: :development
|
|
36
92
|
prerelease: false
|
|
37
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
94
|
requirements:
|
|
39
|
-
- -
|
|
95
|
+
- - "~>"
|
|
40
96
|
- !ruby/object:Gem::Version
|
|
41
|
-
version:
|
|
97
|
+
version: '1.23'
|
|
42
98
|
- !ruby/object:Gem::Dependency
|
|
43
|
-
name:
|
|
99
|
+
name: simplecov
|
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
|
101
|
+
requirements:
|
|
102
|
+
- - "~>"
|
|
103
|
+
- !ruby/object:Gem::Version
|
|
104
|
+
version: '0.21'
|
|
105
|
+
type: :development
|
|
106
|
+
prerelease: false
|
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
108
|
+
requirements:
|
|
109
|
+
- - "~>"
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: '0.21'
|
|
112
|
+
- !ruby/object:Gem::Dependency
|
|
113
|
+
name: actionpack
|
|
44
114
|
requirement: !ruby/object:Gem::Requirement
|
|
45
115
|
requirements:
|
|
46
116
|
- - ">="
|
|
@@ -54,7 +124,7 @@ dependencies:
|
|
|
54
124
|
- !ruby/object:Gem::Version
|
|
55
125
|
version: '4'
|
|
56
126
|
- !ruby/object:Gem::Dependency
|
|
57
|
-
name:
|
|
127
|
+
name: activesupport
|
|
58
128
|
requirement: !ruby/object:Gem::Requirement
|
|
59
129
|
requirements:
|
|
60
130
|
- - ">="
|
|
@@ -99,6 +169,7 @@ description: Tame Rails' multi-line logging into a single line per request
|
|
|
99
169
|
email:
|
|
100
170
|
- meyer@paperplanes.de
|
|
101
171
|
- benjamin.lovell@gmail.com
|
|
172
|
+
- mike@mikebian.co
|
|
102
173
|
executables: []
|
|
103
174
|
extensions: []
|
|
104
175
|
extra_rdoc_files: []
|
|
@@ -110,6 +181,7 @@ files:
|
|
|
110
181
|
- lib/lograge/formatters/helpers/method_and_path.rb
|
|
111
182
|
- lib/lograge/formatters/json.rb
|
|
112
183
|
- lib/lograge/formatters/key_value.rb
|
|
184
|
+
- lib/lograge/formatters/key_value_deep.rb
|
|
113
185
|
- lib/lograge/formatters/l2met.rb
|
|
114
186
|
- lib/lograge/formatters/lines.rb
|
|
115
187
|
- lib/lograge/formatters/logstash.rb
|
|
@@ -129,8 +201,9 @@ files:
|
|
|
129
201
|
homepage: https://github.com/roidrage/lograge
|
|
130
202
|
licenses:
|
|
131
203
|
- MIT
|
|
132
|
-
metadata:
|
|
133
|
-
|
|
204
|
+
metadata:
|
|
205
|
+
rubygems_mfa_required: 'true'
|
|
206
|
+
changelog_uri: https://github.com/roidrage/lograge/blob/master/CHANGELOG.md
|
|
134
207
|
rdoc_options: []
|
|
135
208
|
require_paths:
|
|
136
209
|
- lib
|
|
@@ -138,16 +211,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
138
211
|
requirements:
|
|
139
212
|
- - ">="
|
|
140
213
|
- !ruby/object:Gem::Version
|
|
141
|
-
version: '
|
|
214
|
+
version: '2.5'
|
|
142
215
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
216
|
requirements:
|
|
144
217
|
- - ">="
|
|
145
218
|
- !ruby/object:Gem::Version
|
|
146
219
|
version: '0'
|
|
147
220
|
requirements: []
|
|
148
|
-
|
|
149
|
-
rubygems_version: 2.7.6
|
|
150
|
-
signing_key:
|
|
221
|
+
rubygems_version: 4.0.14
|
|
151
222
|
specification_version: 4
|
|
152
223
|
summary: Tame Rails' multi-line logging into a single line per request
|
|
153
224
|
test_files: []
|