#NEWLINE# def log( self , msg = '' , level = 20 , traceback = False ) : #NEWLINE# #INDENT# 'Log the given message. Append the last traceback if requested.' #NEWLINE# if traceback : #NEWLINE# #INDENT# msg += ( '\n' + '' . join ( _traceback . format_exception ( * sys . exc_info ( ) ) ) ) #NEWLINE# #UNINDENT# self . publish ( 'log' , msg , level )