#NEWLINE# def __call__( self , event ) : #NEWLINE# #INDENT# '\n        Forward events to contained observers.\n        ' #NEWLINE# if ( 'log_trace' in event ) : #NEWLINE# #INDENT# def trace( observer ) : #NEWLINE# #INDENT# '\n                Add tracing information for an observer.\n\n                @param observer: an observer being forwarded to\n                @type observer: L{ILogObserver}\n                ' #NEWLINE# event [ 'log_trace' ] . append ( ( self , observer ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# trace = None #NEWLINE# #UNINDENT# brokenObservers = [ ] #NEWLINE# for observer in self . _observers : #NEWLINE# #INDENT# if ( trace is not None ) : #NEWLINE# #INDENT# trace ( observer ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# observer ( event ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# brokenObservers . append ( ( observer , Failure ( ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# for ( brokenObserver , failure ) in brokenObservers : #NEWLINE# #INDENT# errorLogger = self . _errorLoggerForObserver ( brokenObserver ) #NEWLINE# errorLogger . failure ( OBSERVER_DISABLED , failure = failure , observer = brokenObserver )