def InitServerLog(persistor=None):
 persistor = (persistor or LogBatchPersistor())
 LogBatchPersistor.SetInstance(persistor)
 server_log_handler = ServerLogHandler()
 server_log_handler.setLevel(logging.INFO)
 error_log_handler = ErrorLogHandler()
 error_log_handler.setLevel(logging.WARNING)
 logging.getLogger().addHandler(server_log_handler)
 logging.getLogger().addHandler(error_log_handler)

def InitServerLog ( persistor = None ) : persistor = ( persistor or LogBatchPersistor ( ) ) LogBatchPersistor . SetInstance ( persistor ) server_log_handler = ServerLogHandler ( ) server_log_handler . setLevel ( logging . INFO ) error_log_handler = ErrorLogHandler ( ) error_log_handler . setLevel ( logging . WARNING ) logging . getLogger ( ) . addHandler ( server_log_handler ) logging . getLogger ( ) . addHandler ( error_log_handler )
establishes an instance of logbatchpersistor .