Simple Logging Customization

Is there a simple way to customize logging so that when you call the logger method it includes the severity in the log? I just want to make it easy to find with something like a GREP.

So a call to this: logger.warn('my message')

Would put this in the log: WARNING: My message

Thanks, Tom

http://wiki.rubyonrails.org/rails/pages/HowtoConfigureLogging

Just create a custom formatter and reference the log level there. Something like the following, warning this has not been tested.

class Logger   def format_message(severity, timestamp, progname, msg)     "#{RAILS_DEFAULT_LOGGER.level} #{timestamp} (#{$$}) #{msg}\n"   end end

Regards, Michael Guterl