<s> import logging <EOL> from os . path import realpath , dirname <EOL> from logging import config , DEBUG , INFO <EOL> __all__ = [ "<STR_LIT>" ] <EOL> class Log ( object ) : <EOL> """<STR_LIT>""" <EOL> def debug ( self , debug ) : <EOL> """<STR_LIT>""" <EOL> if self . logger . isEnabledFor ( DEBUG ) : <EOL> self . logger . debug ( debug ) <EOL> def info ( self , info ) : <EOL> """<STR_LIT>""" <EOL> if self . logger . isEnabledFor ( INFO ) : <EOL> self . logger . info ( info ) <EOL> def warn ( self , warn ) : <EOL> """<STR_LIT>""" <EOL> self . logger . warn ( warn ) <EOL> def error ( self , exception ) : <EOL> """<STR_LIT>""" <EOL> self . logger . error ( str ( exception ) , exc_info = <NUM_LIT:1> ) <EOL> def critical ( self , critical ) : <EOL> """<STR_LIT>""" <EOL> self . logger . critical ( critical ) <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> logging . config . fileConfig ( "<STR_LIT>" % dirname ( realpath ( __file__ ) ) ) <EOL> self . logger = logging . getLogger ( "<STR_LIT>" ) <EOL> log = Log ( ) </s>
