Logging a certain event only once in ruby

Posted by Andrew Grimm on Stack Overflow See other posts from Stack Overflow or by Andrew Grimm
Published on 2010-06-08T06:26:29Z Indexed on 2010/06/08 6:32 UTC
Read the original article Hit count: 228

Filed under:
|

Are there any logging frameworks in ruby that allow you to log a specific event type only once?

logger = IdealLogger.new
logger.log(:happy_path, "We reached the happy path") # => logs this message
logger.log(:happy_path, "We reached the happy path yet again") # => Doesn't log this
logger.log(:sad_path, "We've encountered a sad path!") # => logs this message

Also, is there a term for the concept of logging a certain event type only once?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about logging