[Rg 40] Small Informer patch
Lars Olsson
lasso at lassoweb.se
Tue Jun 26 15:00:05 EDT 2007
Hi!
I've created a small patch to allow the Informer class to only catch
specific tags (any combination of :debug, :error, :info and :warn
messages). This allows for better log separation. For instance, you
could log all errors to a file while just showing debug info on the
screen. Like this:
Inform.loggers.clear
Inform.loggers << Informer.new(File.new('logs/errors.log', 'w'), [:error])
Inform.loggers << Informer.new($stdout, [:debug])
Anyway, I'll hope you find this patch useful. Adapt it at your pleasure
(or just nuke it if you don't like it).
Kindly
/lasso
________________________________________
Lars Olsson
lasso at lassoweb.se
http://www.lassoweb.se/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: informer_log_levels
Url: http://rubyforge.org/pipermail/ramaze-general/attachments/20070626/672b6112/attachment.pl
More information about the Ramaze-general
mailing list