| Module | SkynetDebugger |
| In: |
lib/skynet/skynet_debugger.rb
|
The SkynetDebugger is a module you can include in any of your classes that will give you easy access to the Skynet::Logger. including SkynetDebugger gives you a number of logging methods. Each logging method lets you pass a message as well as an optional number of objects which will be pretty_printed after your message. Log lines print with their log level, PID, time, class, and message. eg.
[WARN] #78002 2008-04-11 14:17:15.363167 <WORKER-78002> Exiting...
You can set the log_level and log_file with (See Skynet::Config)
Skynet::CONFIG[:SKYNET_LOG_FILE] Skynet::CONFIG[:SKYNET_LOG_LEVEL]
Possible log levels include
Logger::DEBUG Logger::INFO Logger::WARN Logger::ERROR Logger::FATAL
log - returns the Skynet::Logger debug(msg,*objects_to_inspect) info(msg,*objects_to_inspect) warn(msg,*objects_to_inspect) error(msg,*objects_to_inspect) fatal(msg,*objects_to_inspect) printlog(msg,*objects_to_inspect) #printlog will ALWAYS print to the log as log level [LOG] regardless of the LOG_LEVEL