Alex Sharp <[email protected]> wrote:
> I would love to see a timestamp in each line of unicorn stderr and
> stdout logs. Has this been considered? Thanks.
Unicorn itself never writes directly to stdout[1]. Once daemonized, it
never writes to stderr directly, either. If it does either of these,
it's a bug in Unicorn and needs to be reported and fixed.
All writing through stderr happens through a Logger object which does
timestamping/formatting, but Rails may screw up the formatting:
>From the {FAQ}[http://unicorn.bogomips.org/FAQ.html]:
| === Why are log messages from Unicorn are unformatted when using Rails?
|
| Current versions of Rails unfortunately overrides the default Logger
| formatter.
|
| You can undo this behavior with the default logger in your Unicorn
| config file:
|
| Configurator::DEFAULTS[:logger].formatter = Logger::Formatter.new
|
| Of course you can specify an entirely different logger as well
| with the "logger" directive described by Unicorn::Configurator.
It would be helpful for somebody who uses Rails to fix this behavior
in Rails.
[1] - stdout is reserved for the application; I configure
{clogger}[http://clogger.rubyforge.org/] to log to stdout if I'm
using clogger.
--
Eric Wong
_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying