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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87c30ee495dde3dc0d332c0c112108f14bf66dc5
4
- data.tar.gz: da338ca8a8eb2595740199307a14b9f7526f0886
3
+ metadata.gz: d5e73bdbf504d36b2e6266e91dae7d1a5a033eeb
4
+ data.tar.gz: 802ab34d3ab9d161deac72e7c7596b6d88b9c168
5
5
  SHA512:
6
- metadata.gz: de82021502e6ff643318b41a82fa8a8b135e0215c65d2f2d92356d00deb39d32a89571e5dfb8fc3441ef92fa4cfd4b23159fef69fe08640db1817b97488383d9
7
- data.tar.gz: d8046cde7755499f924b90dc9dc4045d2de9567e5492241c241e3d22c1ce8cd157a7b9195cde444db8a3411f3a973c12c14ab4d9be862d02342322f1686bc471
6
+ metadata.gz: cd059ec8dfde28adbc1e1107008c7d7bbb4832d1679ccda6e92d182d891e845a76c889451c017da3c1fdfb33b26a0a7d68a91a1c3b0fddd751abff33c65bb1f0
7
+ data.tar.gz: 8f00d41ed68d4950a3d760a1acae66fe3a05dfcebd67efa0ab96cacce97d9c884cd489c407116e3daa6225ff3fb65bf747a14bd182bb09ad8ddcfa554a962cb5
@@ -1,3 +1,7 @@
1
+ ## 0.19.1
2
+
3
+ - Fixes compatibility with `ActiveRecord::SessionStore`. [#96](https://github.com/dwbutler/logstash-logger/pull/96)
4
+
1
5
  ## 0.19.0
2
6
 
3
7
  - Flush buffered messages when exiting. [#92](https://github.com/dwbutler/logstash-logger/pull/92)
@@ -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.extend(self)
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 :level_without_threadsafety, :level
25
- alias_method :level, :level_with_threadsafety
26
- alias_method :add_without_threadsafety, :add
27
- alias_method :add, :add_with_threadsafety
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 level_with_threadsafety
52
- thread_level || level_without_threadsafety
51
+ def level_with_thread_safety
52
+ thread_level || level_without_thread_safety
53
53
  end
54
54
 
55
- def add_with_threadsafety(severity, message = nil, progname = nil, &block)
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
- add_without_threadsafety(severity, message, progname, &block)
59
+ add_without_thread_safety(severity, message, progname, &block)
60
60
  end
61
61
  end
62
62
 
@@ -1,3 +1,3 @@
1
1
  module LogStashLogger
2
- VERSION = "0.19.0"
2
+ VERSION = "0.19.1"
3
3
  end
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2016-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-event