snipy/ilogging.py
def getlogger(pkg='', handler=None):
    """
    패키지 혹은 채널 로거
    logging.getLogger(package_name) or logg.getLogger()
    :param pkg: str
    """
    from .caller import caller

    if not pkg:
        m = caller.modulename()
        s = m.split('.', 1)
        if len(s) > 1:
            pkg = s[0]

    if haslogger(pkg):
        return logging.getLogger(pkg)
    else:
        # local
        logger = logging.getLogger(pkg)
        logger.addHandler(handler or default_handler)
        logger.setLevel(logging.DEBUG)
        return logger
def getlogger(pkg='', handler=None):
    """
    패키지 혹은 채널 로거
    logging.getLogger(package_name) or logg.getLogger()
    :param pkg: str
    """
    from .caller import caller

    if not pkg:
        m = caller.modulename()
        s = m.split('.', 1)
        if len(s) > 1:
            pkg = s[0]

    if haslogger(pkg):
        return logging.getLogger(pkg)
    else:
        # local
        logger = logging.getLogger(pkg)
        logger.addHandler(handler or default_handler)
        logger.setLevel(logging.DEBUG)
        return logger
패키지 혹은 채널 로거
    logging.getLogger(package_name) or logg.getLogger()
    :param pkg: str