semantic_logger 4.8.1 → 4.8.2
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 +6 -1
- data/lib/semantic_logger/loggable.rb +7 -0
- 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: d0bd2e2a218bdbf0bfa67ca85da999b352de9b214383890278c0710cd3f84e91
|
4
|
+
data.tar.gz: dd3b393e8f0a031ddb25c2ca3cdeaa7d761617586f366006e79d7fcf3de8a9a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dba969cf8d70cbb63a6542a692b68773f395eda22515267c572630aa5180a3bbfe490f2096e83cc366f06e86bbf06bafc87d2e5800810110107ac5080b7a1046
|
7
|
+
data.tar.gz: 35d69548ee2a91fb4d7c0575ea2d1da48648a7352d52304e8f270a6fe095c42e7ad1367594cef0b14941e14fc47906816df2360899c37fc577828b368c71c21a
|
@@ -62,9 +62,14 @@ module SemanticLogger
|
|
62
62
|
def initialize(io: nil, file_name: nil, **args, &block)
|
63
63
|
if io
|
64
64
|
@log = io
|
65
|
+
unless @log.respond_to?(:write)
|
66
|
+
raise(ArgumentError, "SemanticLogging::Appender::File :io is not a valid IO instance: #{io.inspect}")
|
67
|
+
end
|
65
68
|
else
|
66
69
|
@file_name = file_name
|
67
|
-
|
70
|
+
unless file_name
|
71
|
+
raise(ArgumentError, "SemanticLogging::Appender::File missing mandatory parameter :file_name or :io")
|
72
|
+
end
|
68
73
|
|
69
74
|
reopen
|
70
75
|
end
|
@@ -32,7 +32,14 @@ module SemanticLogger
|
|
32
32
|
module Loggable
|
33
33
|
def self.included(base)
|
34
34
|
base.extend ClassMethods
|
35
|
+
base.singleton_class.class_eval do
|
36
|
+
undef_method :logger if method_defined?(:logger)
|
37
|
+
undef_method :logger= if method_defined?(:logger=)
|
38
|
+
end
|
35
39
|
base.class_eval do
|
40
|
+
undef_method :logger if method_defined?(:logger)
|
41
|
+
undef_method :logger= if method_defined?(:logger=)
|
42
|
+
|
36
43
|
# Returns [SemanticLogger::Logger] class level logger
|
37
44
|
def self.logger
|
38
45
|
@semantic_logger ||= SemanticLogger[self]
|
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.2
|
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-
|
11
|
+
date: 2021-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|