enhanced-logger 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a1e7e4ce05f9f09807de01773a6df70dc9be604
4
- data.tar.gz: 97de94a8aa17900ead139ea756072137125f8ebd
3
+ metadata.gz: dbb27cef891438a0c1fe03c5dff29ff8a01e6886
4
+ data.tar.gz: 1d9e2d85bb98ba72d05eb153241184a2565936ee
5
5
  SHA512:
6
- metadata.gz: 4da328dce6ea3cb27f49c110fa7f4b16ad3c4e95b74fb0fa9089d9a6a61ac94c2f8dd91c22df4fdf2eebbeabb59abefb2997bf3a427d9a2e32eccebff456250a
7
- data.tar.gz: 677953933509c0b343a4337ef9429018ac0c98aa0e1fad2d4826fe546102b262203e6bbcb656adc9157a76a0583e171e42d887176eacc43534f35ae1741bbce0
6
+ metadata.gz: f79f12df2fb40151d13f61a0ca1c9743a2a1c0c426c1512616a80bf82032a8ec3955999d13a27280667470e284b6db962b16de045b47d20ee06c7c81f9cda8d0
7
+ data.tar.gz: fdcc4d17bc2bd77c4a5dada5681b519fc437764beee8b84a25034a813200142b0279222ce2b51dc3199c4e81c9d51f89c62e239956500dd8b09614f0cad820b3
@@ -5,7 +5,7 @@ module EnhancedLogger
5
5
  attr_accessor :level
6
6
 
7
7
  def initialize level=:info
8
- @level = LEVELS[ level ] || LEVELS[ :info ]
8
+ @level = level || :info
9
9
  $stdout.sync = true
10
10
  end
11
11
 
@@ -20,43 +20,43 @@ module EnhancedLogger
20
20
  end
21
21
 
22
22
  def debug?
23
- @level <= LEVELS[ :debug ]
23
+ LEVELS[ @level ] <= LEVELS[ :debug ]
24
24
  end
25
25
 
26
26
  def info?
27
- @level >= LEVELS[ :info ]
27
+ LEVELS[ @level ] <= LEVELS[ :info ]
28
28
  end
29
29
 
30
30
  def warn?
31
- @level <= LEVELS[ :warn ]
31
+ LEVELS[ @level ] <= LEVELS[ :warn ]
32
32
  end
33
33
 
34
34
  def error?
35
- @level <= LEVELS[ :error ]
35
+ LEVELS[ @level ] <= LEVELS[ :error ]
36
36
  end
37
37
 
38
38
  def fatal?
39
- @level <= LEVELS[ :fatal ]
39
+ LEVELS[ @level ] <= LEVELS[ :fatal ]
40
40
  end
41
41
 
42
42
 
43
- def debug msg
43
+ def debug msg=nil
44
44
  puts formatted( msg ) if debug?
45
45
  end
46
46
 
47
- def info msg = nil
47
+ def info msg=nil
48
48
  puts formatted( msg ) if info?
49
49
  end
50
50
 
51
- def warn msg
51
+ def warn msg=nil
52
52
  puts formatted( msg ) if warn?
53
53
  end
54
54
 
55
- def error msg
55
+ def error msg=nil
56
56
  puts formatted( msg ) if error?
57
57
  end
58
58
 
59
- def fatal msg
59
+ def fatal msg=nil
60
60
  puts formatted( msg ) if fatal?
61
61
  end
62
62
 
@@ -1,3 +1,3 @@
1
1
  module EnhancedLogger
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enhanced-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Ulmer