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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/logger/logging.rb +13 -9
  3. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d3d9b850d7b6504436f37025a32e0cf5852c3199
4
- data.tar.gz: 1ab5d3e62bd3263ff44a88dd15a000aa241c5366
3
+ metadata.gz: ae69bb9d4428ef4c6caf52d3d2e6f208220a2cb0
4
+ data.tar.gz: 8d112bae61501cf837a0717933cc015846016c63
5
5
  SHA512:
6
- metadata.gz: 1e79502808ac4ea93020e1b1fe8aa5d7c076c1ce16fb7ff94e09fae03c3f4ea2587c8fd7eed66e0b23b3a4a9bc21158051c580de7a1b8eb9156bf35f259ec814
7
- data.tar.gz: 7aa79aa2e311218e704d49924b7b664b9ba636681b50c4296a2eedcb7d62f63b1ed0707b63f05a418c3b39de51de87bc991cbb24fd7114ad17f27643db2d7ef3
6
+ metadata.gz: 393464b21aa0a3eae21ba4f103eca8d14ced9a7b7eaf3a21e18ee5aab92cdf0c0699ccb9db7e094cf606345afe7d657eb2bfc060607f48615c028e9e0b673963
7
+ data.tar.gz: 610a9708bc525cfcd21a8f16a3e696ef8973450cb757861599bc0eac2e1e886177416c1b0f820fba18d9ac4b345975599ce3749653cbc843fd410b3731c1a4e8
@@ -18,18 +18,22 @@ module Logger::Logging
18
18
  @logger ||= Factory.()
19
19
  end
20
20
 
21
- def logger= logger
22
- if logger
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
- logger
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
- @logger = logger
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.3
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-10-17 00:00:00.000000000 Z
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: