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}]")
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}]")
def cli(debug): if debug or settings.DEBUG: b_log.setup_logzero(level="debug") logger.debug("I'm in debug mode")