Two problems:
1) It seems to me that by default quickstarted project in production
does not log python tracebacks into server log. I tried to change
logging configuration but it didn't help, the only way i could get
traceback is by setting server.environment to "development".
2) When TG process started with start-stop-daemon, there is no log...
at all. My script is started as follows:
start-stop-daemon --chuid $USER --start --pidfile $PIDFILE \
--chdir $APP_PATH --background --make-pidfile --startas
$DAEMON -- $CONFIG
(where APP_PATH is TG applicaiton path and DAEMON is the start-app.py
script)
The only way I could get logfile in this case was completely removing
logging configuration from prod.cfg and removing log.cfg.
Does anybody have a working example of production logging config that
logs traceback?! That would be very helpful.
Thanks a lot,
Ksenia
I had to fiddle with it for quite a while, but here is something that
outputs tracebacks. Change the [[[fatboy]]] and qualname='fatboy' to
whatever your project name is.
I believe the tracebacks happen in cherrypy.msg. This is only for
errors, it doesn't display anything like an access_log. I think you'll
have to fiddle around with the access_out directive for that.
Jason
[logging]
[[formatters]]
[[[full_content]]]
format='*(asctime)s *(name)s *(levelname)s *(message)s'
[[handlers]]
#[[[access_out]]]
## set the filename as the first argument below
#args="('server.log',)"
#class='FileHandler'
#level='INFO'
#formatter='full_content'
[[[error_out]]]
args="('server.log',)"
class='FileHandler'
level='DEBUG'
formatter='full_content'
[[loggers]]
[[[fatboy]]]
level='DEBUG'
qualname='fatboy'
handlers=['error_out']
[[[access]]]
level='INFO'
qualname='cherrypy.msg'
handlers=['error_out']
#propagate=0