ougai 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ougai/logger.rb +13 -0
- data/lib/ougai/version.rb +1 -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: ee55ccd0e16bdcaafe5880046fc7e09a17cde478
|
4
|
+
data.tar.gz: ab8146d77524e26ecb3ab5498740792d77f585fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 154c083a42f3581dd78084c706f017d5f26bda3dda67f2a802b83f11906457def3a89241930ecc40279d8db0fcbec09dc863e0df7405f53235ec4b2768f23b69
|
7
|
+
data.tar.gz: ac30201aa80e3f45f7e6072d1ba4e344a5e15f9d1c1ea2dfb2109e4c5cec979672fde5fdcef735ba2e629743ad1bd583c21c1455f430c6e80ec86e071c41c47f
|
data/lib/ougai/logger.rb
CHANGED
@@ -32,6 +32,19 @@ module Ougai
|
|
32
32
|
super(to_item(message, ex, data))
|
33
33
|
end
|
34
34
|
|
35
|
+
def self.broadcast(logger)
|
36
|
+
Module.new do |mdl|
|
37
|
+
::Logger::Severity.constants.each do |severity|
|
38
|
+
method_name = severity.downcase.to_sym
|
39
|
+
|
40
|
+
mdl.send(:define_method, method_name) do |*args|
|
41
|
+
logger.send(method_name, *args)
|
42
|
+
super(*args)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
35
48
|
protected
|
36
49
|
|
37
50
|
def create_formatter
|
data/lib/ougai/version.rb
CHANGED