Hi
> You can overload call method from Formatter.
>
> example:
>
> class Logger
> class Formatter
> Format = "%s [%s] %s %sn"
> def call(severity, time, progname, msg)
> Format % [severity, format_datetime(time), progname, msg]
> end
> end
> end
>
> $LOG.error('This is much shorter.')
> # ERROR [2006-03-31T19:35:01.058646 ] This is much shorter.
>
Thanks for your reply. Where should I place this code? In
environment.rb or any initializer?
Thanks
Tom
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.