When I run my twisted application as follows:
twistd --pidfile ./twistd.pid -l $HOME/logs/my_application.log -oy service.tac
I found that it does not log anything sent through python logging . I noticed that there is "PythonLoggingObserver" in twisted, but redirects twisted logs to the log module.
I would like to find out how I can get all the logs (regardless of the log module) to go to the log file specified by the "-l" command in twistd. I suspect my logs are being written to the stdout daemon.
Here's how I initialize python logging in a .tac file:
import logging
LOG_LEVEL = logging.DEBUG
logger = logging.getLogger(module_name)
logger.setLevel(LOG_LEVEL)
logging.basicConfig(level=LOG_LEVEL)
source
share