Daemon and logging - the best approach?
Lech Karol Pawłaszek
i at tak.znajdziesz
Fri Nov 7 16:14:47 CET 2008
I'm trying to make a daemon and I want to log to a file its activity.
I'm using logging module with a configuration file for it (loaded via
And now I want to read logging config file before daemonize the program
because the file might not be accessible after daemonization. OTOH while
daemonizing I am closing all opened file descriptors - including those
opened for logging.
What is the best approach to handle such situation? Should I close all
FD before daemonizing or just forget it? Any other hints?
Lech Karol Pawłaszek <ike>
"You will never see me fall from grace" [KoRn]
More information about the Python-list