#NEWLINE# def emit( self , record ) : #NEWLINE# #INDENT# 'Handles emit calls from logging, stores the logged record in an internal list that is\n        accessible via MockHandler.get.\n        ' #NEWLINE# msg = self . format ( record ) #NEWLINE# self . buf . setdefault ( record . levelno , [ ] ) #NEWLINE# self . buf [ record . levelno ] . append ( msg )