i’m calling a twisted python program as such:
twistd -l twisted.log -y controller.py
based on all the documentation i’ve read:
- l should direct the output from STDERR to the logfile
- y should daemonize this , and give me a shell prompt
instead:
- the log file is untouched
- all the debug stuff goes to stderr ( from ‘import logging’ )
- the app doesn’t daemonize ( so i have to stay logged in )
can someone please point me in the right direction ? thanks.
edit:
the tac contains this:
from twisted.internet import protocol, reactor
from twisted.application import service
application = service.Application('myapp daemon')
dbUpdateService= DbUpdater_UpdateService()
dbUpdateService.setServiceParent(application)
dbUpdateService.startService()
# repeat with 3x services
reactor.run()
It doesn’t look like you’re using
twistdright.-yoption reads a.tacfile, not a.pyfile. Technically a.tacis Python source code too, but it has a few additional rules and it isn’t supposed to be a module. There’s some explanation here.-loption sends output fromtwisted.python.log, notlogging.controller.pythat you’re not supposed to (that file is executed before daemonization), but you didn’t attachcontroller.pyso really I have no idea.Please ask questions with more detail about what you’re actually doing in the future. Without any of the code to your application, the above is mostly guesses.