def getlogger(use_print=False): global logging if logging is None: if use_print: class logging: warning = info = debug = print else: replace_logging() import logging return logging
def getlogger(use_print=False): global logging, logger if logging is None: if use_print: class logging: warning = info = debug = print logger = logging else: replace_logging() import logging logger = logging.getLogger('[launcher]') return logger