Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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