| Home | Trees | Indices | Help |
|
|---|
|
|
twisted.application.service.Service --+
|
twisted.application.service.MultiService --+
|
object --+ |
| |
referenceable.OnlyReferenceable --+ |
| |
referenceable.Referenceable --+
|
GatheringBase --+
|
GathererService
Run a service that gathers logs from multiple applications.
The LogGatherer sits in a corner and receives log events from many applications at once. At startup, it runs a Tub and emits the gatherer's long-term FURL. You can then configure your applications to connect to this FURL when they start and pass it a reference to their LogPublisher. The gatherer will subscribe to the publisher and save all the resulting messages in a logs.pickle file.
Applications can use code like the following to create a LogPublisher and pass it to the gatherer:
def tub_ready(self):
# called when the Tub is available for registerReference
lp = LogPublisher('logport.furl')
lp.setServiceParent(self.tub)
log_gatherer_furl = self.get_config('log_gatherer.furl')
if log_gatherer_furl:
self.tub.connectTo(log_gatherer_furl,
self._log_gatherer_connected, lp)
def _log_gatherer_connected(self, rref, lp):
rref.callRemote('logport', self.nodeid, lp)
This LogGatherer class is meant to be run by twistd from a .tac file, but applications that want to provide the same functionality can just instantiate it with a distinct basedir= and call startService.
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
verbose = True
|
|||
furlFile =
|
|||
tacFile =
|
|||
TIME_FORMAT =
|
|||
__implemented__ = <implementedBy foolscap.logging.gatherer.Gat
|
|||
__provides__ = <zope.interface.declarations.ClassProvides obje
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
|
|
|||
__implemented__
|
__provides__
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Oct 14 18:27:47 2008 | http://epydoc.sourceforge.net |