buffering_logger 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/buffering_logger/logger.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 243e3e793bcd45fdf09c8ae4697546f7ef1805c4
|
4
|
+
data.tar.gz: 4ec124f406edcca8860cfc17e8d29c6e019bebf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7810a492bdd74a1468a30069ff61922893fe970522d907926385b413ce673452260a33d675703d0f505a1b115f4ee9ceeba079b009292dff056e914c3ce6fa17
|
7
|
+
data.tar.gz: 294724ac15d92bd4337c75457fa1a72daee9202899c0fd93d86b73c921bb566db65ea9d9c84419183a8bbb9cec4e0a34a7bcebb7fde35dce04b28181da388663
|
@@ -7,6 +7,7 @@ require 'logger'
|
|
7
7
|
module BufferingLogger
|
8
8
|
class Logger < ::Logger
|
9
9
|
|
10
|
+
attr_accessor :default_transform
|
10
11
|
attr_reader :raw_log_device
|
11
12
|
|
12
13
|
def initialize(logdev, shift_age: 0, shift_size: 1048576)
|
@@ -29,7 +30,7 @@ module BufferingLogger
|
|
29
30
|
@logdev = Buffer.new(@raw_log_device)
|
30
31
|
end
|
31
32
|
|
32
|
-
def buffered(transform:
|
33
|
+
def buffered(transform: default_transform)
|
33
34
|
@logdev.buffered(transform: transform) do
|
34
35
|
yield
|
35
36
|
end
|