#NEWLINE# def __process_multiprocessing_logging_queue( opts , queue ) : #NEWLINE# #INDENT# import salt.utils #NEWLINE# salt . utils . appendproctitle ( 'MultiprocessingLoggingQueue' ) #NEWLINE# if salt . utils . is_windows ( ) : #NEWLINE# #INDENT# setup_temp_logger ( ) #NEWLINE# setup_extended_logging ( opts ) #NEWLINE# #UNINDENT# while True : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# record = queue . get ( ) #NEWLINE# if ( record is None ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# logger = logging . getLogger ( record . name ) #NEWLINE# logger . handle ( record ) #NEWLINE# #UNINDENT# except ( EOFError , KeyboardInterrupt , SystemExit ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# except Exception as exc : #NEWLINE# #INDENT# logging . getLogger ( __name__ ) . warning ( 'An exception occurred in the multiprocessing logging queue thread: {0}' . format ( opts ) , exc_info_on_loglevel = logging . DEBUG )