views:

18

answers:

1

I have a python cgi script (just python, I didn't use any framework). It's served using Lighttpd on openSUSE. I would like to redirect my logging statements (like logging.info and so on) to be included to Lighttpd log file. If this can't be done, how can I create my own log file?

+1  A: 

Your goal of logging to the lighttpd log file looks unlikely: http://redmine.lighttpd.net/boards/2/topics/16

It does seem that you could use the FastCGI interface to provide a place to write error messages.

Here's a simple tutorial on using python's logger facility to write to your own log files: http://docs.python.org/library/logging.html

sarnold