Package foolscap :: Package logging :: Module incident :: Class IncidentReporter
[hide private]
[frames] | no frames]

Class IncidentReporter

source code

Known Subclasses:

Once an Incident has been declared, I am responsible for making a durable record all relevant log events. I do this by creating a logfile (a pickle of log event dictionaries) and copying everything from the history buffer into it. I can copy a small number of future events into it as well, to record what happens as the application copes with the situtation.

I am responsible for just a single incident.

I am created with a reference to a FoolscapLogger instance, from which I will grab the contents of the history buffer.

When I have closed the incident logfile, I will notify the logger by calling their incident_recorded() method, passing it the local filename of the logfile I created and the triggering event. This can be used to notify remote subscribers about the incident that just occurred.

Instance Methods [hide private]
 
__init__(self, basedir, logger, tubid_s) source code
 
is_active(self) source code
 
format_time(self, when) source code
 
incident_declared(self, triggering_event) source code
 
trailing_event(self, ev) source code
 
new_trigger(self, ev) source code
 
stop_recording(self) source code
 
finished_recording(self) source code
 
__providedBy__(...)
Object Specification Descriptor
Class Variables [hide private]
  TRAILING_DELAY = 5.0
  TRAILING_EVENT_LIMIT = 100
  TIME_FORMAT = '%Y-%m-%d-%H%M%S'
  __implemented__ = <implementedBy foolscap.logging.incident.Inc...
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Class Variable Details [hide private]

__implemented__

Value:
<implementedBy foolscap.logging.incident.IncidentReporter>

__provides__

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