<s> """<STR_LIT>""" <EOL> import logbook <EOL> from sentry import capture <EOL> class SentryHandler ( logbook . Handler ) : <EOL> def emit ( self , record ) : <EOL> tags = ( ( '<STR_LIT>' , logbook . get_level_name ( record . level ) . lower ( ) ) , ( '<STR_LIT>' , record . channel ) ) <EOL> if record . exc_info : <EOL> return capture ( '<STR_LIT>' , exc_info = record . exc_info , tags = tags ) <EOL> return capture ( '<STR_LIT>' , message = record . message , tags = tags ) </s>
