semlogger 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/semlogger.rb +11 -8
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -27,9 +27,19 @@ end
27
27
  end
28
28
 
29
29
  class Semlogger < ::Logger
30
- class CustomType
30
+ class Base
31
31
  attr_accessor :logger
32
32
 
33
+ def add severity, progname = nil, &block
34
+ @logger.add severity, self, progname = nil, &block
35
+ end
36
+
37
+ ::Semlogger::Severity.constants.each do |severity|
38
+ module_eval "def #{severity.downcase}( *a, &e) add #{::Semlogger::Severity.const_get severity}, *a, &e end", __FILE__, __LINE__
39
+ end
40
+ end
41
+
42
+ class CustomType < Base
33
43
  def initialize name, *obj
34
44
  @name, @obj = name.to_s.to_sym, obj
35
45
  end
@@ -37,13 +47,6 @@ class Semlogger < ::Logger
37
47
  def to_semlogger
38
48
  [@name] + @obj
39
49
  end
40
-
41
- def add severity, progname = nil, &block
42
- @logger.add severity, self, progname = nil, &block
43
- end
44
- ::Semlogger::Severity.constants.each do |severity|
45
- module_eval "def #{severity.downcase}( *a, &e) add #{::Semlogger::Severity.const_get severity}, *a, &e end", __FILE__, __LINE__
46
- end
47
50
  end
48
51
 
49
52
  attr_accessor :logdev, :level, :progname
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 6
9
- version: 0.0.6
8
+ - 7
9
+ version: 0.0.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Denis Knauf
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-10-15 00:00:00 +02:00
17
+ date: 2012-10-17 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency