Package foolscap :: Package logging :: Module gatherer :: Class IncidentGathererService
[hide private]
[frames] | no frames]

Class IncidentGathererService

source code

 twisted.application.service.Service --+        
                                       |        
twisted.application.service.MultiService --+    
                                           |    
                          object --+       |    
                                   |       |    
     referenceable.OnlyReferenceable --+   |    
                                       |   |    
             referenceable.Referenceable --+    
                                           |    
                               GatheringBase --+
                                               |
             incident.IncidentClassifierBase --+
                                               |
                                              IncidentGathererService

Run a service that gathers Incidents from multiple applications.

The IncidentGatherer sits in a corner and receives incidents 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 incidents in the incidents/ directory, organized by the publisher's tubid. The gatherer will also run a set of user-supplied classifier functions on the incidents and put the filenames (one line per incident) into files in the categories/ directory.

This IncidentGatherer class is meant to be run as a standalone service from bin/flogtool, but by careful subclassing and setup it could be run as part of some other application.

Nested Classes [hide private]

Inherited from GatheringBase: tub_class

Instance Methods [hide private]
 
__init__(self, classifiers=[], basedir=None, stdout=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
startService(self) source code
 
classify_stored_incidents(self, indir) source code
 
remote_logport(self, nodeid, publisher) source code
 
new_incident(self, abs_fn, rel_fn, tubid_s, incident) source code
 
move_incident(self, rel_fn, tubid_s, incident) source code

Inherited from GatheringBase: tub_ready

Inherited from twisted.application.service.MultiService: __iter__, addService, getServiceNamed, privilegedStartService, removeService, stopService

Inherited from twisted.application.service.Service: __getstate__, __providedBy__, disownServiceParent, setName, setServiceParent

Inherited from referenceable.Referenceable: doRemoteCall, getInterface, getInterfaceName

Inherited from referenceable.OnlyReferenceable: processUniqueID

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from incident.IncidentClassifierBase: add_classifier, add_classify_files, classify_incident, load_incident

Class Variables [hide private]
  verbose = True
  furlFile = 'log_gatherer.furl'
  tacFile = 'gatherer.tac'
  __implemented__ = <implementedBy foolscap.logging.gatherer.Inc...
  __provides__ = <zope.interface.declarations.ClassProvides obje...

Inherited from GatheringBase: use_local_addresses

Inherited from twisted.application.service.Service: name, parent, running

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, classifiers=[], basedir=None, stdout=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: incident.IncidentClassifierBase.__init__

startService(self)

source code 
Overrides: twisted.application.service.Service.startService

Class Variable Details [hide private]

__implemented__

Value:
<implementedBy foolscap.logging.gatherer.IncidentGathererService>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x927d3ac>