change default log level to WARNING #1215

Manually merged
anarcat merged 1 commits from anarcat/foot:log-level-warning into master 2022-11-23 15:28:23 +00:00
8 changed files with 11 additions and 9 deletions

View File

@ -65,9 +65,11 @@
modes that are known but unsupported.
* Set `PWD` environment variable in the slave process ([#1179][1179]).
* DPI is now forced to 96 when found to be unreasonably high.
* Set default log level to warning ([#1215][1215]).
[1166]: https://codeberg.org/dnkl/foot/issues/1166
[1179]: https://codeberg.org/dnkl/foot/issues/1179
[1215]: https://codeberg.org/dnkl/foot/pulls/1215
### Deprecated

View File

@ -94,7 +94,7 @@ print_usage(const char *prog_name)
" -N,--no-wait detach the client process from the running terminal, exiting immediately\n"
" -o,--override=[section.]key=value override configuration option\n"
" -E, --client-environment exec shell using footclient's environment, instead of the server's\n"
" -d,--log-level={info|warning|error|none} log level (info)\n"
" -d,--log-level={info|warning|error|none} log level (warning)\n"
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
" -v,--version show the version number and quit\n"
" -e ignored (for compatibility with xterm -e)\n";
@ -178,7 +178,7 @@ main(int argc, char *const *argv)
const char *custom_cwd = NULL;
const char *server_socket_path = NULL;
enum log_class log_level = LOG_CLASS_INFO;
enum log_class log_level = LOG_CLASS_WARNING;
enum log_colorize log_colorize = LOG_COLORIZE_AUTO;
bool hold = false;
bool client_environment = false;

View File

@ -15,7 +15,7 @@ complete -c foot -x -s W -l window-size-chars
complete -c foot -F -s s -l server -d "run as server; open terminals by running footclient"
complete -c foot -s H -l hold -d "remain open after child process exits"
complete -c foot -r -s p -l print-pid -d "print PID to this file or FD when up and running (server mode only)"
complete -c foot -x -s d -l log-level -a "info warning error none" -d "log-level (info)"
complete -c foot -x -s d -l log-level -a "info warning error none" -d "log-level (warning)"
complete -c foot -x -s l -l log-colorize -a "always never auto" -d "enable or disable colorization of log output on stderr"
complete -c foot -s S -l log-no-syslog -d "disable syslog logging (server mode only)"
complete -c foot -s v -l version -d "show the version number and quit"

View File

@ -18,7 +18,7 @@ _arguments \
'(-s --server)'{-s,--server}'[run as server; open terminals by running footclient]:server:_files' \
'(-H --hold)'{-H,--hold}'[remain open after child process exits]' \
'(-p --print-pid)'{-p,--print-pid}'[print PID to this file or FD when up and running (server mode only)]:pidfile:_files' \
'(-d --log-level)'{-d,--log-level}'[log level (info)]:loglevel:(info warning error none)' \
'(-d --log-level)'{-d,--log-level}'[log level (warning)]:loglevel:(info warning error none)' \
'(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \
'(-S --log-no-syslog)'{-s,--log-no-syslog}'[disable syslog logging (server mode only)]' \
'(-v --version)'{-v,--version}'[show the version number and quit]' \

View File

@ -16,7 +16,7 @@ _arguments \
'(-N --no-wait)'{-N,--no-wait}'[detach the client process from the running terminal, exiting immediately]' \
'(-o --override)'{-o,--override}'[configuration option to override, in form SECTION.KEY=VALUE]:()' \
'(-E --client-environment)'{-E,--client-environment}"[child process inherits footclient's environment, instead of the server's]" \
'(-d --log-level)'{-d,--log-level}'[log level (info)]:loglevel:(info warning error none)' \
'(-d --log-level)'{-d,--log-level}'[log level (warning)]:loglevel:(info warning error none)' \
'(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \
'(-v --version)'{-v,--version}'[show the version number and quit]' \
'(-h --help)'{-h,--help}'[show help message and quit]' \

View File

@ -142,7 +142,7 @@ the foot command line
*-d*,*--log-level*={*info*,*warning*,*error*,*none*}
Log level, used both for log output on stderr as well as
syslog. Default: _info_.
syslog. Default: _warning_.
*-l*,*--log-colorize*=[{*never*,*always*,*auto*}]
Enables or disables colorization of log output on stderr. Default:

View File

@ -75,7 +75,7 @@ terminal has terminated.
*-d*,*--log-level*={*info*,*warning*,*error*,*none*}
Log level, used both for log output on stderr as well as
syslog. Default: _info_.
syslog. Default: _warning_.
*-l*,*--log-colorize*=[{*never*,*always*,*auto*}]
Enables or disables colorization of log output on stderr.

4
main.c
View File

@ -83,7 +83,7 @@ print_usage(const char *prog_name)
" Without PATH, $XDG_RUNTIME_DIR/foot-$WAYLAND_DISPLAY.sock will be used.\n"
" -H,--hold remain open after child process exits\n"
" -p,--print-pid=FILE|FD print PID to file or FD (only applicable in server mode)\n"
" -d,--log-level={info|warning|error|none} log level (info)\n"
" -d,--log-level={info|warning|error|none} log level (warning)\n"
" -l,--log-colorize=[{never|always|auto}] enable/disable colorization of log output on stderr\n"
" -s,--log-no-syslog disable syslog logging (only applicable in server mode)\n"
" -v,--version show the version number and quit\n"
@ -236,7 +236,7 @@ main(int argc, char *const *argv)
bool fullscreen = false;
bool unlink_pid_file = false;
const char *pid_file = NULL;
enum log_class log_level = LOG_CLASS_INFO;
enum log_class log_level = LOG_CLASS_WARNING;
enum log_colorize log_colorize = LOG_COLORIZE_AUTO;
bool log_syslog = true;
user_notifications_t user_notifications = tll_init();