Skip to content

Instantly share code, notes, and snippets.

@miebach
Last active December 23, 2015 08:29
Show Gist options
  • Save miebach/6608079 to your computer and use it in GitHub Desktop.
Save miebach/6608079 to your computer and use it in GitHub Desktop.
Cherrypy server logging and running as a service on windows
This will result in 3 log files: the access log, the error log
and another one for the remaining console_output. Even
after configuring the access and the error log still
a lot of output only gos to the console, so it is necessary
to catch it. On windows it could be done like this:
serve.cmd:
---------
cd %~dp0
python serve.py > log\console_output.txt 2>&1
serve.py:
--------
conf = {
'/' : {
# ...
'log.screen' : False,
'log.error_file' : 'log\\access_log.txt',
'log.access_file' : 'log\\access_log.txt',
},
# ...
}
@miebach
Copy link
Author

miebach commented Sep 18, 2013

See also http://tools.cherrypy.org/wiki/WindowsService, which I did not do. I am using http://nssm.cc/ for the windows service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment