Skip to content

Commit

Permalink
Merge pull request #4 from ampledata/patch-1
Browse files Browse the repository at this point in the history
Fixing RDoc formatting of README.rdoc.
  • Loading branch information
Serdar Sutay committed May 21, 2014
2 parents 417baa6 + 2a74447 commit 9dfcd70
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

Mixlib::Log provides a mixin for enabling a class based logger object, a-la Merb, Chef, and Nanite. To use it:

require 'mixlib/log'

class Log
extend Mixlib::Log
end
require 'mixlib/log'
class Log
extend Mixlib::Log
end

You can then do:

Log.debug("foo")
Log.info("bar")
Log.warn("baz")
Log.error("baz")
Log.fatal("wewt")

By default, Mixlib::Logger logs to STDOUT. To alter this, you should call Log.init, passing any arguments to the standard Ruby Logger. For example:
Log.debug('foo')
Log.info('bar')
Log.warn('baz')
Log.error('baz')
Log.fatal('wewt')

By default, <tt>Mixlib::Logger</tt> logs to STDOUT. To alter this, you should call +Log.init+, passing any arguments to the standard Ruby Logger. For example:

Log.init('/tmp/logfile') # log to /tmp/logfile
Log.init('/tmp/logfile', 7) # log to /tmp/logfile, rotate every day

Log.init("/tmp/logfile") # log to /tmp/logfile
Log.init("/tmp/logfile", 7) # log to /tmp/logfile, rotate every day

Enjoy!
Enjoy!

0 comments on commit 9dfcd70

Please sign in to comment.