def log_writer():
 while True:
  mpstate.logfile_raw.write(mpstate.logqueue_raw.get())
  while (not mpstate.logqueue_raw.empty()):
   mpstate.logfile_raw.write(mpstate.logqueue_raw.get())
  while (not mpstate.logqueue.empty()):
   mpstate.logfile.write(mpstate.logqueue.get())
  if mpstate.settings.flushlogs:
   mpstate.logfile.flush()
   mpstate.logfile_raw.flush()

def log_writer ( ) : while True : mpstate . logfile_raw . write ( mpstate . logqueue_raw . get ( ) ) while ( not mpstate . logqueue_raw . empty ( ) ) : mpstate . logfile_raw . write ( mpstate . logqueue_raw . get ( ) ) while ( not mpstate . logqueue . empty ( ) ) : mpstate . logfile . write ( mpstate . logqueue . get ( ) ) if mpstate . settings . flushlogs : mpstate . logfile . flush ( ) mpstate . logfile_raw . flush ( )
log writing thread .