#NEWLINE# def logEvent( self , * events ) : #NEWLINE# #INDENT# "\n        Send one or more events to Python's logging module, and\n        capture the emitted L{logging.LogRecord}s and output stream as\n        a string.\n\n        @param events: events\n        @type events: L{tuple} of L{dict}\n\n        @return: a tuple: (records, output)\n        @rtype: 2-tuple of (L{list} of L{logging.LogRecord}, L{bytes}.)\n        " #NEWLINE# pl = self . py_logger ( ) #NEWLINE# observer = STDLibLogObserver ( stackDepth = ( STDLibLogObserver . defaultStackDepth + 1 ) ) #NEWLINE# for event in events : #NEWLINE# #INDENT# observer ( observer ) #NEWLINE# #UNINDENT# return ( pl . bufferedHandler . records , pl . outputAsText ( ) )