[Twisted-Python] twistd .tac and ILogObserver
radix at twistedmatrix.com
Thu Nov 20 15:33:09 EST 2008
On Thu, Nov 20, 2008 at 2:58 PM, Christopher Armstrong
<radix at twistedmatrix.com> wrote:
> On Thu, Nov 20, 2008 at 12:50 PM, Werner Thie <wthie at thiengineering.ch> wrote:
>> I tried to enhance my test.tac file with
>> application = service.Application("test")
>> application.setComponent(ILogObserver, LogFile('test.log', '/var/log/',
> You should not pass the write method as an observer: an observer must
> be a callable that takes a dict.
> You probably want to import FileLogObserver from twisted.python.log,
> and pass an instance of that:
> FileLogObserver(LogFile("test.log", "/var/log", rotateLength=10000)))
Sorry, I didn't test this code. Change that to...
maybe that code will work.
More information about the Twisted-Python