Dnia czwartek, 23 lutego 2012 07:57:23 Roberto De Ioris pisze:
> > I use this comandline:
> > uwsgi --master --exit-on-reload --die-on-term --show-config --http :34946
> > --ini
> > myapp.ini --daemonize myapp.log
> > 
> > to do some automated app tests, with latest 1.1-dev if the application
> > fails
> > to start (for example non-existing config.ru in rails app), than myapp.log
> > file
> > is empty. This file is created but it seems that it is filled with startup
> > messages only after the app is started. With 1.0 I had proper error logs
> > there
> > if app failed to start.
> > How can I track startup errors with 1.1? Should I use some other options
> > now?
> > 
> > Łukasz Mierzwa
> 
> It has been a long standing problem in other areas. 1.1 amplified that as
> it will tries to postpone messaging until logging is configured.
> 
> I think i have found a solution:
> 
> http://projects.unbit.it/uwsgi/browser/uwsgi.c#L1191
> 
> i have added a new atexit() hook. It will check if there are datas in the
> logpipe (the pipe created to delegate logs to the master) and it flushes
> it:
> 
> http://projects.unbit.it/uwsgi/browser/uwsgi.c#L1121
> 
> 
> uwsgi_master_log() is the same function called by the master during normal
> cycle, so it should work as expected and with all of the plugins (and
> falling back to terminal/file logging if a logger is still unconfigured)
> 
> Let me know if it works

It works fine now, thanks.

Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to