| Path: | lib/syslog_logger_env_formatting.rb |
| Last Update: | Wed Dec 21 14:16:53 +0200 2011 |
Adds some default information to syslog messages. If you pass a User or Device object as the first parameter, it will log that user/device‘s id If you pass a block from a controller, it will automatically log the current user id If you pass a block, the class name of the block‘s context will be added
Examples logger.debug "O‘Doyle Rules!"
#=> [development] [DEBUG: 2008-01-25 14:16:12.12345] O'Doyle Rules!
from within a controller… logger.error {"Something is messed up!"}
#=> [development] [ERROR: 2008-01-25 14:16:12.12345] [123] [ClassName] Something is messed up!