Package foolscap :: Package logging :: Module interfaces :: Class RILogPublisher
[hide private]
[frames] | no frames]

Class RILogPublisher

source code

remoteinterface.RemoteInterface --+
                                  |
                                 RILogPublisher

Instance Methods [hide private]
 
get_versions() source code
 
get_pid() source code
 
subscribe_to_all(observer=RILogObserver, catch_up=Optional(bool,False))
Call unsubscribe() on the returned RISubscription object to stop receiving messages.
source code
 
unsubscribe(subscription=Any()) source code
 
enumerate_logfiles() source code
 
list_incidents(since=Optional(str,""))
Return a dict that maps an 'incident name' (a string of the form 'incident-TIMESTAMP-UNIQUE') to the triggering event (a single event dictionary).
source code
 
subscribe_to_incidents(observer=RILogObserver, catch_up=Optional(bool,False), since=Optional(str,""))
Subscribe to hear about new Incidents, optionally catching up on old ones.
source code
 
get_incident(incident_name=str)
Given an incident name, return the header dict and list of event dicts for that incident.
source code
Class Variables [hide private]
  __remote_name__ = 'RILogPublisher.foolscap.lothar.com'
  _InterfaceClass__attrs = {'enumerate_logfiles': <foolscap.remo...
  __bases__ = (<RemoteInterfaceClass foolscap.remoteinterface.Re...
  __identifier__ = 'foolscap.logging.interfaces.RILogPublisher'
  __iro__ = (<RemoteInterfaceClass foolscap.logging.interfaces.R...
  __name__ = 'RILogPublisher'
  __sro__ = (<RemoteInterfaceClass foolscap.logging.interfaces.R...
  _implied = {<InterfaceClass zope.interface.Interface>: (), <Re...
  dependents = <WeakKeyDictionary at 142880620>
Method Details [hide private]

list_incidents(since=Optional(str,""))

source code 

Return a dict that maps an 'incident name' (a string of the form 'incident-TIMESTAMP-UNIQUE') to the triggering event (a single event dictionary). The incident name can be passed to get_incident() to obtain the list of events (including header) contained inside the incident report. Incident names will sort in chronological order.

If the optional since= argument is provided, then this will only return incident names that are alphabetically greater (and thus chronologically later) than the given string. This can be used to poll an application for incidents that have occurred since a previous query. For real-time reporting, use subscribe_to_incidents() instead.

subscribe_to_incidents(observer=RILogObserver, catch_up=Optional(bool,False), since=Optional(str,""))

source code 

Subscribe to hear about new Incidents, optionally catching up on old ones.

Each new Incident will be reported by name+trigger to the observer by a new_incident() message. This message will be sent after the incident reporter has finished working (usually a few seconds after the triggering event).

If catch_up=True, then old Incidents will be sent to the observer before any new ones are reported. When the publisher has finished sending the names of all old events, it will send a done_with_incident_catchup() message to the observer. Only old Incidents with a name that is alphabetically greater (and thus later) than the since= argument will be sent. Use since='' to catch up on all old Incidents.

Call unsubscribe() on the returned RISubscription object to stop receiving messages.


Class Variable Details [hide private]

_InterfaceClass__attrs

Value:
{'enumerate_logfiles': <foolscap.remoteinterface.RemoteMethodSchema in\
stance at 0x870542c>,
 'get_incident': <foolscap.remoteinterface.RemoteMethodSchema instance\
 at 0x870520c>,
 'get_pid': <foolscap.remoteinterface.RemoteMethodSchema instance at 0\
x870552c>,
 'get_versions': <foolscap.remoteinterface.RemoteMethodSchema instance\
 at 0x87055ac>,
...

__bases__

Value:
(<RemoteInterfaceClass foolscap.remoteinterface.RemoteInterface>)

__iro__

Value:
(<RemoteInterfaceClass foolscap.logging.interfaces.RILogPublisher>,
 <RemoteInterfaceClass foolscap.remoteinterface.RemoteInterface>,
 <InterfaceClass zope.interface.Interface>)

__sro__

Value:
(<RemoteInterfaceClass foolscap.logging.interfaces.RILogPublisher>,
 <RemoteInterfaceClass foolscap.remoteinterface.RemoteInterface>,
 <InterfaceClass zope.interface.Interface>)

_implied

Value:
{<InterfaceClass zope.interface.Interface>: (),
 <RemoteInterfaceClass foolscap.logging.interfaces.RILogPublisher>: ()\
,
 <RemoteInterfaceClass foolscap.remoteinterface.RemoteInterface>: ()}