[Twisted-Python] twistd .tac and ILogObserver

Christopher Armstrong radix at twistedmatrix.com
Thu Nov 20 14:58:12 EST 2008

On Thu, Nov 20, 2008 at 12:50 PM, Werner Thie <wthie at thiengineering.ch> wrote:
> Hi
> I tried to enhance my test.tac file with
>             :
> application = service.Application("test")
> application.setComponent(ILogObserver, LogFile('test.log', '/var/log/',
> rotateLength=10000).write)

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)))

Christopher Armstrong

More information about the Twisted-Python mailing list