def init_log(debug=False, syslog=False, logthreshold=None, logfile=None, logformat=LOG_FORMAT, logdateformat=LOG_DATE_FORMAT, fmt=None, rotation_parameters=None, handler=None):
 logger = logging.getLogger()
 if (handler is None):
  handler = get_handler(debug, syslog, logfile, rotation_parameters)
 logger.handlers = [handler]
 logthreshold = get_threshold(debug, logthreshold)
 logger.setLevel(logthreshold)
 if (fmt is None):
  if debug:
   fmt = get_formatter(logformat=logformat, logdateformat=logdateformat)
  else:
   fmt = logging.Formatter(logformat, logdateformat)
 handler.setFormatter(fmt)
 return handler

def init_log ( debug = False , syslog = False , logthreshold = None , logfile = None , logformat = LOG_FORMAT , logdateformat = LOG_DATE_FORMAT , fmt = None , rotation_parameters = None , handler = None ) : logger = logging . getLogger ( ) if ( handler is None ) : handler = get_handler ( debug , syslog , logfile , rotation_parameters ) logger . handlers = [ handler ] logthreshold = get_threshold ( debug , logthreshold ) logger . setLevel ( logthreshold ) if ( fmt is None ) : if debug : fmt = get_formatter ( logformat = logformat , logdateformat = logdateformat ) else : fmt = logging . Formatter ( logformat , logdateformat ) handler . setFormatter ( fmt ) return handler
init the log service .