semantic_logger 4.8.0 → 4.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/semantic_logger/appender/file.rb +4 -0
- data/lib/semantic_logger/appenders.rb +3 -7
- data/lib/semantic_logger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c969376e41c290b01fd22a111b1eca500ab4a01e80e13d4fbf18b800b9c50c9e
|
4
|
+
data.tar.gz: 4319e88ebd250dd524add711cd16508d8f825686cfa28731f19d52c35854d738
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 435ada2480d22e98e3e4467086167411f0620f9a0fd4d9210bb715c7a7ef3defe08986afaf8b174aeb55a5bde8ba46dfefea1c8d693c78623495755d2a41c6e2
|
7
|
+
data.tar.gz: bb2a64552713ae4fcb3b3ae59133e4a5241ecb4692ddc7304e77f72bc76ef47e219cfd481dbebd482385e7b53e161d15b245b644c01030e9cb021c65ec222d0a
|
@@ -11,8 +11,8 @@ module SemanticLogger
|
|
11
11
|
def add(**args, &block)
|
12
12
|
appender = SemanticLogger::Appender.factory(**args, &block)
|
13
13
|
|
14
|
-
if appender.
|
15
|
-
logger.warn "Ignoring attempt to add a second console appender since it would result in duplicate console output."
|
14
|
+
if appender.respond_to?(:console_output?) && appender.console_output? && console_output?
|
15
|
+
logger.warn "Ignoring attempt to add a second console appender: #{appender.class.name} since it would result in duplicate console output."
|
16
16
|
return
|
17
17
|
end
|
18
18
|
|
@@ -23,11 +23,7 @@ module SemanticLogger
|
|
23
23
|
# Whether any of the existing appenders already output to the console?
|
24
24
|
# I.e. Writes to stdout or stderr.
|
25
25
|
def console_output?
|
26
|
-
any?
|
27
|
-
next unless appender.is_a?(Appender::File)
|
28
|
-
|
29
|
-
[$stderr, $stdout].include?(appender.instance_variable_get(:@log))
|
30
|
-
end
|
26
|
+
any? { |appender| appender.respond_to?(:console_output?) && appender.console_output? }
|
31
27
|
end
|
32
28
|
|
33
29
|
def log(log)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.8.
|
4
|
+
version: 4.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|