views:

78

answers:

3

What are best practices for managing custom logging in Ruby? Should I be monkeypatching logger to do what I want? Or extending from it? Or delegating? What's the rubyish way? I'm sick of custom hacks for this; I'd like something cleaner, and ideally more elegant.

A: 

Hi I use RAILS_DEFAULT_LOGGER when I need log something

Bohdan Pohorilets
+1  A: 

Bates has a screencast on customizing logger.

And here is a blog post on custom logging.

Here are some tips on logging.

Sam
thanks for these :)
Joe
+2  A: 

Have you checked log4r?

Mladen Jablanović
very nice! thanks
Joe