#NEWLINE# def local_logger( logname , loglevel = logging . DEBUG ) : #NEWLINE# #INDENT# loglevel = integer_loglevel ( loglevel ) #NEWLINE# logger = logging . getLogger ( logname ) #NEWLINE# if any ( [ isinstance ( h , logging . StreamHandler ) for h in logger . handlers ] ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# handler = logging . StreamHandler ( ) #NEWLINE# handler . setLevel ( loglevel ) #NEWLINE# logger . addHandler ( handler ) #NEWLINE# logger . setLevel ( loglevel ) #NEWLINE# return logger