From 5dca0458a09ebc586fda49c50533976f055d8de2 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Sat, 26 Jun 2021 22:15:09 +0100 Subject: log: add LOG_CLASS_NONE and use as initializer for log_level This means that logging will be completely disabled until log_init() has been called, which is useful to prevent log spam when running UNITTEST{} blocks in debug builds. Note that this doesn't change the default log level at runtime, which was already being set to LOG_CLASS_INFO in main.c and client.c. The new log level is also exposed to the command-line interface as `--log-level=none`, which allows disabling logging entirely. --- completions/bash/foot | 2 +- completions/bash/footclient | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'completions/bash') diff --git a/completions/bash/foot b/completions/bash/foot index f03a9f53..f9d9d0fd 100644 --- a/completions/bash/foot +++ b/completions/bash/foot @@ -68,7 +68,7 @@ _foot() which fc-list > /dev/null || return 1 COMPREPLY=( $(compgen -W "$(fc-list : family | sed 's/,/\n/g' | uniq | tr -d ' ')" -- ${cur}) ) elif [[ ${prev} == '--log-level' ]] ; then - COMPREPLY=( $(compgen -W "error warning info" -- ${cur}) ) + COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) elif [[ ${prev} == '--log-colorize' ]] ; then COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) elif [[ ${prev} =~ ^(--app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|--check-config)$ ]] ; then diff --git a/completions/bash/footclient b/completions/bash/footclient index 8e0aa017..fea45945 100644 --- a/completions/bash/footclient +++ b/completions/bash/footclient @@ -59,7 +59,7 @@ _footclient() which toe > /dev/null || return 1 COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 ~ /[+]/ {next}; {print $1}')" -- ${cur}) ) elif [[ ${prev} == '--log-level' ]] ; then - COMPREPLY=( $(compgen -W "error warning info" -- ${cur}) ) + COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) elif [[ ${prev} == '--log-colorize' ]] ; then COMPREPLY=( $(compgen -W "never always auto" -- ${cur}) ) elif [[ ${prev} =~ ^(--app-id|--help|--override|--title|--version|--window-size-chars|--window-size-pixels|)$ ]] ; then -- cgit v1.3