<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from sentry . client . base import SentryClient <EOL> import logging <EOL> import sys <EOL> class LoggingSentryClient ( SentryClient ) : <EOL> logger_name = '<STR_LIT>' <EOL> default_level = logging . ERROR <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( LoggingSentryClient , self ) . __init__ ( * args , ** kwargs ) <EOL> self . logger = logging . getLogger ( self . logger_name ) <EOL> def send ( self , event_type , data , ** kwargs ) : <EOL> exc_info = sys . exc_info ( ) <EOL> module , class_name = event_type . rsplit ( '<STR_LIT:.>' , <NUM_LIT:1> ) <EOL> handler = getattr ( __import__ ( module , { } , { } , [ class_name ] , - <NUM_LIT:1> ) , class_name ) ( ) <EOL> message = handler . to_string ( data [ handler . interface ] ) <EOL> self . logger . log ( self . default_level , message , exc_info = True , extra = data ) </s>
