def echo_and_log(msg, priority=LOG_NOTICE, fg=None):
    if (priority >= LOG_ERR):
        click.secho(msg, fg=fg, err=True)
    else:
        click.secho(msg, fg=fg)
    log.log(priority, msg, False)
def echo_and_log(msg, priority=LOG_NOTICE, fg=None):
    if (priority >= LOG_ERR):
        click.secho(msg, fg=fg, err=True)
    else:
        click.secho(msg, fg=fg)
    log.log(priority, msg, False)