logger-logging 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logger/logging.rb +13 -9
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae69bb9d4428ef4c6caf52d3d2e6f208220a2cb0
|
4
|
+
data.tar.gz: 8d112bae61501cf837a0717933cc015846016c63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 393464b21aa0a3eae21ba4f103eca8d14ced9a7b7eaf3a21e18ee5aab92cdf0c0699ccb9db7e094cf606345afe7d657eb2bfc060607f48615c028e9e0b673963
|
7
|
+
data.tar.gz: 610a9708bc525cfcd21a8f16a3e696ef8973450cb757861599bc0eac2e1e886177416c1b0f820fba18d9ac4b345975599ce3749653cbc843fd410b3731c1a4e8
|
data/lib/logger/logging.rb
CHANGED
@@ -18,18 +18,22 @@ module Logger::Logging
|
|
18
18
|
@logger ||= Factory.()
|
19
19
|
end
|
20
20
|
|
21
|
-
def logger=
|
22
|
-
|
23
|
-
if self.is_a? Module
|
24
|
-
logger.progname = "(#{self.name})"
|
25
|
-
else
|
26
|
-
logger.progname = "(#{self.class.name})"
|
27
|
-
end
|
21
|
+
def self.get receiver, logger = nil
|
22
|
+
logger ||= instance
|
28
23
|
|
29
|
-
|
24
|
+
if receiver.is_a? Module
|
25
|
+
logger.progname = "(#{receiver.name})"
|
26
|
+
else
|
27
|
+
logger.progname = "(#{receiver.class.name})"
|
30
28
|
end
|
31
29
|
|
32
|
-
|
30
|
+
logger
|
31
|
+
end
|
32
|
+
|
33
|
+
def logger= logger
|
34
|
+
if logger
|
35
|
+
@logger = Logger::Logging.get self, logger
|
36
|
+
end
|
33
37
|
end
|
34
38
|
|
35
39
|
def logger
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logger-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Logging module that adds colored logging to any class and puts the class
|
14
14
|
name in the log output for easy grepping
|
@@ -46,3 +46,4 @@ signing_key:
|
|
46
46
|
specification_version: 4
|
47
47
|
summary: Logging module that adds colored logging to any class
|
48
48
|
test_files: []
|
49
|
+
has_rdoc:
|