enhanced-logger 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/enhanced_logger/logger.rb +7 -7
- data/lib/enhanced_logger/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: 9758e89d9fe8fbbd43e02e8ec5444983630f0111
|
4
|
+
data.tar.gz: 10373e2f8c954c8ddec61e858e5997fb1f154789
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 748c8e6774fa8d844f86bb779fad56544e08e20e83e8d783333eb252e5d12a15f49ca3341d06b0e745f672cb5db14471b4e687559becbdc3165f47a895702c81
|
7
|
+
data.tar.gz: 9d8e727dfaea81cbeac21c08a323ac366784f10dd38064f21b117a968f85e881434362cc4dff48093fe93e99fb0e9b868ee8ec2726f44c1d5fb465bbd2f48dbf
|
@@ -4,8 +4,8 @@ module EnhancedLogger
|
|
4
4
|
|
5
5
|
attr_accessor :level
|
6
6
|
|
7
|
-
def initialize level
|
8
|
-
@level = level
|
7
|
+
def initialize level=1
|
8
|
+
@level = level
|
9
9
|
$stdout.sync = true
|
10
10
|
end
|
11
11
|
|
@@ -20,23 +20,23 @@ module EnhancedLogger
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def debug?
|
23
|
-
|
23
|
+
@level <= LEVELS[ :debug ]
|
24
24
|
end
|
25
25
|
|
26
26
|
def info?
|
27
|
-
|
27
|
+
@level <= LEVELS[ :info ]
|
28
28
|
end
|
29
29
|
|
30
30
|
def warn?
|
31
|
-
|
31
|
+
@level <= LEVELS[ :warn ]
|
32
32
|
end
|
33
33
|
|
34
34
|
def error?
|
35
|
-
|
35
|
+
@level <= LEVELS[ :error ]
|
36
36
|
end
|
37
37
|
|
38
38
|
def fatal?
|
39
|
-
|
39
|
+
@level <= LEVELS[ :fatal ]
|
40
40
|
end
|
41
41
|
|
42
42
|
|