Last Modified
2012-08-01 09:46:03 -0400
Requires

Description

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!