mini_logger 0.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mini_logger.rb +3 -9
- data/lib/version.rb +2 -2
- metadata +3 -25
data/lib/mini_logger.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'logger'
|
3
|
-
require 'config_context'
|
4
3
|
|
5
4
|
|
6
5
|
module MiniLogger
|
@@ -8,7 +7,7 @@ module MiniLogger
|
|
8
7
|
|
9
8
|
LOG_CHANNEL_KEY = :log_channel
|
10
9
|
LOG_LEVEL_KEY = :log_level
|
11
|
-
DEFAULT_CONFIGURATION = { LOG_CHANNEL_KEY=>STDERR, LOG_LEVEL_KEY=>::Logger::
|
10
|
+
DEFAULT_CONFIGURATION = { LOG_CHANNEL_KEY=>STDERR, LOG_LEVEL_KEY=>::Logger::INFO }
|
12
11
|
VALID_METHODS = [:debug, :info, :warn, :error, :fatal]
|
13
12
|
|
14
13
|
|
@@ -21,13 +20,8 @@ module MiniLogger
|
|
21
20
|
|
22
21
|
def configure( options=DEFAULT_CONFIGURATION )
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
options.keys.each { |property| config[property] = options[property] }
|
27
|
-
end
|
28
|
-
|
29
|
-
@logger ||= Logger.new( ConfigContext[LOG_CHANNEL_KEY] )
|
30
|
-
@logger.level ||= ConfigContext[LOG_LEVEL_KEY]
|
23
|
+
@logger ||= Logger.new( options[LOG_CHANNEL_KEY] )
|
24
|
+
@logger.level ||= options[LOG_LEVEL_KEY]
|
31
25
|
|
32
26
|
self
|
33
27
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: mini_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Javier Juarez
|
@@ -10,11 +10,11 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-02-
|
13
|
+
date: 2011-02-15 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
17
|
+
name: config_context
|
18
18
|
requirement: &id001 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
@@ -24,28 +24,6 @@ dependencies:
|
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: config_context
|
29
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
-
none: false
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: "0"
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: config_context
|
40
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: "0"
|
46
|
-
type: :runtime
|
47
|
-
prerelease: false
|
48
|
-
version_requirements: *id003
|
49
27
|
description: My config DSL
|
50
28
|
email: javier.juarez@gmail.com
|
51
29
|
executables: []
|