<s> """<STR_LIT>""" <EOL> import logging <EOL> from util import log_to_gitter <EOL> class GitterHandler ( logging . Handler ) : <EOL> """<STR_LIT>""" <EOL> def emit ( self , record ) : <EOL> """<STR_LIT>""" <EOL> msg = str ( self . format ( record ) ) <EOL> if record . exc_info : <EOL> exc = logging . _defaultFormatter . formatException ( record . exc_info ) <EOL> msg += "<STR_LIT:\n>" + exc <EOL> log_to_gitter ( msg ) </s>
