Raised exceptions are not logged when USR2

Iñaki Baz Castillo ibc at aliax.net
Mon Jan 4 05:27:27 EST 2010

El Domingo, 3 de Enero de 2010, Eric Wong escribió:
> If you really want to, you may be able to subclass SyslogLogger and give
> it IO-like methods (write/puts/flush) are require for Rack::Lint
> compatibility and then set $stderr:
>   # Totally untested, stick this in your Unicorn config file and let
>   # us know if it works or blows up badly:
>   require 'syslog_logger'
>   class MySyslogLogger < SyslogLogger
>     alias puts error
>     alias write error
>     def flush; self; end
>   end
>   $stderr = MySyslogLogger.new('foo')

They would be also needed these methods:

    def reopen(v); true; end
    def sync=(v); v; end

Iñaki Baz Castillo <ibc at aliax.net>

More information about the mongrel-unicorn mailing list