fujin (owner)

Revisions

gist: 226448 Download_button fork
public
Public Clone URL: git://gist.github.com/226448.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
j@AJ-Christensens-MacBook (branch: master) ~/Development/chef$ irb
>> require 'mixlib/log'
=> true
>> class Foo
>> extend Mixlib::Log
>> end
=> Foo
>> Foo.init(STDOUT)
=> #<Logger:0x101739ef0 @level=0, @logdev=#<Logger::LogDevice:0x101739e50 @filename=nil, @mutex=#<Logger::LogDevice::LogDeviceMutex:0x101739e00 @mon_owner=nil, @mon_waiting_queue=[], @mon_entering_queue=[], @mon_count=0>, dev#<IO:0x1001b6b50, @shift_size=nil, @shift_age=nil>, default_formatter#<Logger::Formatter:0x101739ea0 @datetime_format=nil>, formatter#<Mixlib::Log::Formatter:0x101739ec8 @datetime_format=nil>, prognamenil
>> Foo.level(:debug)
=> 0
>> Foo.debug "foo"
[Thu, 05 Nov 2009 11:30:26 +1300] DEBUG: foo
=> true
 
Text only #
1
2
3
4
5
6
7
8
9
10
>> class Bar
>> extend Mixlib::Log
>> Bar.init STDOUT
>> Bar.level :debug
>> end
=> 0
>> Bar.debug "foo"
[Thu, 05 Nov 2009 11:37:22 +1300] DEBUG: foo
=> true
 
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
j@AJ-Christensens-MacBook (branch: master) ~/Development/chef$ sudo gem install mixlib-log
Successfully installed mixlib-log-1.0.3
1 gem installed
Installing ri documentation for mixlib-log-1.0.3...
Installing RDoc documentation for mixlib-log-1.0.3...
aj@AJ-Christensens-MacBook (branch: master) ~/Development/chef$ irb
>> require 'mixlib/log'
=> true
>> class Bar
>> extend Mixlib::Log
>> Bar.init STDOUT
>> Bar.level :debug
>> end
=> 0
>> Bar.debug "foo"
[Thu, 05 Nov 2009 11:40:27 +1300] DEBUG: foo
=> true