Opened 9 years ago

Closed 9 years ago

#4676 enhancement closed duplicate (duplicate)

There's no api for setting components in a twistd plugin

Reported by: Drew Smathers Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:


Currently there's no api for setting the components in a twistd plugin. In .tac files, this is trivial:

application.setComponent(ILogObserver, PythonLoggingObserver().emit)

The only way I know how to do this is inheriting from MultiService:

class PythonLoggingMultiService(service.MultiService):

    def setServiceParent(self, parent):
        super(PythonLoggingMultiService, self).setServiceParent(parent)
        parent.setComponent(ILogObserver, PythonLoggingObserver().emit) 

twistd plugins:

Change History (2)

comment:1 Changed 9 years ago by Jean-Paul Calderone

Resolution: duplicate
Status: newclosed

This is a duplicate of #638.

comment:2 Changed 8 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.