logstash-logger 0.19.0 → 0.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/logstash-logger/logger.rb +5 -3
- data/lib/logstash-logger/silenced_logging.rb +8 -8
- data/lib/logstash-logger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5e73bdbf504d36b2e6266e91dae7d1a5a033eeb
|
4
|
+
data.tar.gz: 802ab34d3ab9d161deac72e7c7596b6d88b9c168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd059ec8dfde28adbc1e1107008c7d7bbb4832d1679ccda6e92d182d891e845a76c889451c017da3c1fdfb33b26a0a7d68a91a1c3b0fddd751abff33c65bb1f0
|
7
|
+
data.tar.gz: 8f00d41ed68d4950a3d760a1acae66fe3a05dfcebd67efa0ab96cacce97d9c884cd489c407116e3daa6225ff3fb65bf747a14bd182bb09ad8ddcfa554a962cb5
|
data/CHANGELOG.md
CHANGED
@@ -67,9 +67,7 @@ module LogStashLogger
|
|
67
67
|
device = Device.new(opts)
|
68
68
|
::Logger.new(device).tap do |logger|
|
69
69
|
logger.instance_variable_set(:@device, device)
|
70
|
-
logger
|
71
|
-
logger.extend(TaggedLogging)
|
72
|
-
logger.extend(SilencedLogging)
|
70
|
+
extend_logger(logger)
|
73
71
|
end
|
74
72
|
end
|
75
73
|
|
@@ -87,6 +85,10 @@ module LogStashLogger
|
|
87
85
|
Syslog::Logger.new(opts[:program_name])
|
88
86
|
end
|
89
87
|
|
88
|
+
extend_logger(logger)
|
89
|
+
end
|
90
|
+
|
91
|
+
def self.extend_logger(logger)
|
90
92
|
logger.extend(self)
|
91
93
|
logger.extend(TaggedLogging)
|
92
94
|
logger.extend(SilencedLogging)
|
@@ -21,10 +21,10 @@ module LogStashLogger
|
|
21
21
|
def self.extended(logger)
|
22
22
|
class << logger
|
23
23
|
attr_accessor :silencer
|
24
|
-
alias_method :
|
25
|
-
alias_method :level, :
|
26
|
-
alias_method :
|
27
|
-
alias_method :add, :
|
24
|
+
alias_method :level_without_thread_safety, :level
|
25
|
+
alias_method :level, :level_with_thread_safety
|
26
|
+
alias_method :add_without_thread_safety, :add
|
27
|
+
alias_method :add, :add_with_thread_safety
|
28
28
|
|
29
29
|
Logger::Severity.constants.each do |severity|
|
30
30
|
instance_eval <<-EOT, __FILE__, __LINE__ + 1
|
@@ -48,15 +48,15 @@ module LogStashLogger
|
|
48
48
|
Thread.current[thread_hash_level_key] = level
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
52
|
-
thread_level ||
|
51
|
+
def level_with_thread_safety
|
52
|
+
thread_level || level_without_thread_safety
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
55
|
+
def add_with_thread_safety(severity, message = nil, progname = nil, &block)
|
56
56
|
if (defined?(@logdev) && @logdev.nil?) || (severity || UNKNOWN) < level
|
57
57
|
true
|
58
58
|
else
|
59
|
-
|
59
|
+
add_without_thread_safety(severity, message, progname, &block)
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.19.
|
4
|
+
version: 0.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-event
|