Logs messages as INFO,
    unless esgfpid.defaults.LOG_INFO_TO_DEBUG,
    (then it logs messages as DEBUG).

def loginfo(logger, msg, *args, **kwargs):
    '''
    Logs messages as INFO,
    unless esgfpid.defaults.LOG_INFO_TO_DEBUG,
    (then it logs messages as DEBUG).
    '''
    if esgfpid.defaults.LOG_INFO_TO_DEBUG:
        logger.debug(msg, *args, **kwargs)
    else:
        logger.info(msg, *args, **kwargs)