Class | Nanite::Log |
In: |
lib/nanite/log.rb
lib/nanite/log/formatter.rb |
Parent: | Object |
LEVELS | = | { :debug => Logger::DEBUG, :info => Logger::INFO, :warn => Logger::WARN, :error => Logger::ERROR, :fatal => Logger::FATAL } | Map log levels symbols to values |
file | [RW] | |
level | [RW] | |
logger | [RW] |
Use Nanite::Logger.init when you want to set up the logger manually. If this method is called with no arguments, it will log to STDOUT at the :info level. It also configures the Logger instance it creates to use the custom Nanite::Log::Formatter class.
Sets the level for the Logger by symbol or by command line argument. Throws an ArgumentError if you feed it a bogus log level (that is not one of :debug, :info, :warn, :error, :fatal or the corresponding strings or a valid Logger level)
Passes any other method calls on directly to the underlying Logger object created with init. If this method gets hit before a call to Nanite::Logger.init has been made, it will call Nanite::Logger.init() with no arguments.