[Twisted-Python] Controlling twisted logging
njp at njp.us
Wed Dec 1 13:12:18 EST 2004
Having just spent some time trying to "turn off" twisted logging via
log.discardLogs() and/or log.startLogging(log.NullFile()) in a twisted app
that initially logs to an actual file, it seems that
log.startLogging(log.NullFile()) only works as expected if no previous
startLogging call using a valid file object has been made. Otherwise,
messages continue to be logged.
Is this observation correct, or am I overlooking some way to enable logging
to a logfile and subsequently disable it? In my above experiments,
log.discardLogs() seemed to have no effect either once valid file logging
had been initiated with log.startLogging.
Win2K, Python 2.3.3, Twisted 1.3.0
Thanks for any info,
More information about the Twisted-Python