public
Description: A simple class based Log mechanism, similar to Merb and Chef, that you can mix in to your project.
Homepage: http://www.opscode.com
Clone URL: git://github.com/opscode/mixlib-log.git
name age message
file .gitignore Mon May 11 21:08:08 -0700 2009 Convert to jeweler [fujin]
file LICENSE Wed Mar 11 13:25:45 -0700 2009 Initial commit [adamhjk]
file NOTICE Wed Mar 11 13:25:45 -0700 2009 Initial commit [adamhjk]
file README.rdoc Mon May 11 21:08:08 -0700 2009 Convert to jeweler [fujin]
file Rakefile Thu May 14 09:37:39 -0700 2009 Add spec opts [fujin]
file VERSION.yml Tue May 12 00:20:45 -0700 2009 Version bump to 1.0.3 [fujin]
directory features/ Fri Dec 11 15:09:59 -0800 2009 fix log level setting [Christopher Brown]
directory lib/ Mon Dec 14 11:51:00 -0800 2009 make log level changes backward compatible [Christopher Brown]
file mixlib-log.gemspec Tue May 12 00:20:45 -0700 2009 Regenerated gemspec for version 1.0.3 [fujin]
directory spec/ Mon Dec 14 11:52:54 -0800 2009 making log level changes backward compatible [Christopher Brown]
README.rdoc

Mixlib::Log

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

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.init("/tmp/logfile")    # log to /tmp/logfile
        Log.init("/tmp/logfile", 7) # log to /tmp/logfile, rotate every day

Enjoy!