syslog_logger_env_formatting.rb

Path: lib/syslog_logger_env_formatting.rb
Last Update: Fri Mar 23 13:21:08 -0400 2012

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!

[Validate]