Last active
December 23, 2015 08:29
-
-
Save miebach/6608079 to your computer and use it in GitHub Desktop.
Cherrypy server logging and running as a service on windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | |
}, | |
# ... | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also http://tools.cherrypy.org/wiki/WindowsService, which I did not do. I am using http://nssm.cc/ for the windows service.