I'm using FileLocker Version 2.4.5, CherryPy 3.1.12, and Apache 2 proxy on RHEL 6.3. I haven't been able to get the logging messages (logging.debug()) to print to a file or to stderr/stdout. Normal python print commands work fine in that if I start webFilelocker2.py attached to the current terminal session I see the print statement messages displayed in the terminal. I haven't been able to get the logging.whatever() messages saved or displayed anywhere. I've tested some sample python logging facility code I found at python coding sites and that code writes to a file just fine so this should work.
My filelocker.conf file has the following lines in it
log.screen=False
log.access_file="/var/log/filelocker2/cherrypy.access.log"
log.error_file="/var/log/filelocker2/cherrypy.error.log"
logdir = "/var/log/filelocker2"
loglevel=10
I've tried setting log.screen=True while running it in a terminal window and that didn't seem to make a difference either. If I add a statement like the following
logging.debug("[system] [in def start()] [just trying to get anything logged!!]")
to webFilelocker2.py after the cherrypy engine has started
I'm expecting to see this line in the cherrypy.error.log, but I don't. The only lines that show up there look like CherryPy messages:
[11/Jan/2013:17:11:32] ENGINE Listening for SIGHUP.
[11/Jan/2013:17:11:32] ENGINE Listening for SIGTERM.
[11/Jan/2013:17:11:32] ENGINE Listening for SIGUSR1.
[11/Jan/2013:17:11:32] ENGINE Bus STARTING
[11/Jan/2013:17:11:32] ENGINE PID 18024 written to '/opt/filelocker2/filelocker.pid'.
[11/Jan/2013:17:11:32] ENGINE Started monitor thread '_TimeoutMonitor'.
[11/Jan/2013:17:11:32] ENGINE Serving on 0.0.0.0:8080
[11/Jan/2013:17:11:32] ENGINE Bus STARTED
[11/Jan/2013:17:37:41] ENGINE Bus STOPPING
[11/Jan/2013:17:37:41] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 8080)) shut down
[11/Jan/2013:17:37:41] ENGINE Stopped thread '_TimeoutMonitor'.
[11/Jan/2013:17:37:41] ENGINE Bus STOPPED
[11/Jan/2013:17:37:41] ENGINE Bus EXITING
I'm a python novice. Did I miss something simple?
Use cherrypy.log.error()
Closing this as it's not a bug in Filelocker.