contextual_logger 0.1.0 → 0.2.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64307a3414ac0fb04573871f21c614517d448af9
|
4
|
+
data.tar.gz: cc89a84b0f36ed86012ca745b83983b2fb424a39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd79a3bdfa4c79de7d1f7d02baecd70f554f57cf2eccfde85847341ee34d3c9271ab226cc1b6f32a88fea546f545316d2e998b504b230e53714d8c2d03dffe34
|
7
|
+
data.tar.gz: bf773c138bc8073e22e7f5cb08b63178f58168950e29cc12948430114f46effccbce52519417f823bd1cc486545c8bd50697f6e20c5c06bbf08851337bcb1204
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveSupport
|
4
|
+
module TaggedLogging
|
5
|
+
module Formatter
|
6
|
+
def call(severity, timestamp, progname, msg)
|
7
|
+
msg_with_tags = case msg
|
8
|
+
when Hash
|
9
|
+
msg.merge(log_tags: current_tags.join(', '))
|
10
|
+
else
|
11
|
+
"#{tags_text}#{msg}"
|
12
|
+
end
|
13
|
+
|
14
|
+
super(severity, timestamp, progname, msg_with_tags)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contextual_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Ebentier
|
@@ -31,6 +31,7 @@ extensions: []
|
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
33
|
- lib/contextual_logger.rb
|
34
|
+
- lib/contextual_logger/overrides/active_support/tagged_logging/formatter.rb
|
34
35
|
homepage: https://rubygems.org/gems/contextual_logger
|
35
36
|
licenses:
|
36
37
|
- MIT
|