Esempio n. 1
0
def update_log_level(ctx, param, value):
    silent = False
    if value == "silent":
        silent = True
        value = "info"
    if getattr(logging, value.upper()) is not logger.getEffectiveLevel() or silent:
        b_log.setup_logzero(level=value, silent=silent)
        if not silent:
            click.echo(f"Log level changed to [{value}]")
Esempio n. 2
0
def update_log_level(ctx, param, value):
    if getattr(logging, value.upper()) is not logger.getEffectiveLevel():
        b_log.setup_logzero(level=value)
        click.echo(f"Log level changed to [{value}]")
Esempio n. 3
0
def cli(debug):
    if debug or settings.DEBUG:
        b_log.setup_logzero(level="debug")
    logger.debug("I'm in debug mode")