[Twisted-Python] running twisted with supervisord -- logging question

Hynek Schlawack hs at ox.cx
Sun Aug 24 00:36:20 MDT 2014


Jonathan,

On 24 Aug 2014, at 1:46, Jonathan Vanasco wrote:

> Thanks for the insight.  I was stupid and didn't include my code.
>
> I don't actually want supervisor to handle the logging.  I wanted to 
> have this app's logs in /var/log/myapp-twisted/twisted.log
>
> I just can't figure out how to make this happen.  i've been playing 
> with different permutations of twistd commands, redirect_stderr and 
> stdout_logfile, and haven't found the right balance

I would strongly urge you to do what Christopher told you, and not just 
for Twisted but in general.

Logging everything to stdout/stderr and then using some proper system 
tool to catch and process that instead of the finicky stdlib (or 
Twisted’s for that matter) logging will save you a lot of headaches 
and gain some love if you work with ops people.  Another alternative is 
using syslog which is directly supported by twistd.

—h




More information about the Twisted-Python mailing list