injectedlogger 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/injectedlogger/logger.rb +4 -0
- data/lib/injectedlogger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6145235cf44a5de4aa3d8ba7bd99ac587ce3264f
|
4
|
+
data.tar.gz: 973b5556e555eabb22f035a389fdf8a2c9167610
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 790e2ba277d2019c95f04c742c1cbcd233c76a7ce69c0be77c30aa40af5e227ec2a47c13047501039d15acb49daf66d3bcce20577cf9a1beba5ba20b132d2f49
|
7
|
+
data.tar.gz: 15f2473bdc1ecb1ba3a3401db0bc21d2f41202985850be832d5e44be516d84a5af8ee8ead2f367d4f22511100427a595c85c67c5be1e5443fb3c063a574d89e6
|
@@ -11,6 +11,10 @@ module InjectedLogger
|
|
11
11
|
class << self
|
12
12
|
attr_reader :prefix, :levels, :level_info, :fallback
|
13
13
|
|
14
|
+
def in_use?
|
15
|
+
not logger.nil?
|
16
|
+
end
|
17
|
+
|
14
18
|
def use(logger_obj, levels: LOGLEVELS, fallback: UNKNOWN)
|
15
19
|
if logger and logger != logger_obj
|
16
20
|
raise InUse, "#{self} was already using logger #{logger}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: injectedlogger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Martinez Ruiz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|