diff options
author | Robin Jarry <robin@jarry.cc> | 2022-12-06 17:59:52 +0100 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-12-07 00:45:44 +0100 |
commit | bf713a89d1e8127c02a9680889b5c88809a26f2b (patch) | |
tree | a737948af44dae6f3e5bbe031224e4b9f713f0a3 /config | |
parent | d25efff65aba373be44d1a514c35472bf52994e5 (diff) | |
download | aerc-bf713a89d1e8127c02a9680889b5c88809a26f2b.tar.gz |
log: force trace level when using shell redirection
When using aerc > log, print all messages as it was before the logging
system cleanup.
Requested-by: Tim Culverhouse <tim@timculverhouse.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'config')
-rw-r--r-- | config/aerc.conf | 6 | ||||
-rw-r--r-- | config/general.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/config/aerc.conf b/config/aerc.conf index 8f3fd097..ecae5b90 100644 --- a/config/aerc.conf +++ b/config/aerc.conf @@ -31,9 +31,9 @@ #log-file= # Only log messages above the specified level to log-file. Supported levels -# are: debug, info, warn and error. When redirecting aerc's output to a file -# using > shell redirection, this setting is ignored and the log level is -# forced to debug. +# are: trace, debug, info, warn and error. When redirecting aerc's output to +# a file using > shell redirection, this setting is ignored and the log level +# is forced to trace. # # Default: info #log-level=info diff --git a/config/general.go b/config/general.go index b06eddde..2c09a14e 100644 --- a/config/general.go +++ b/config/general.go @@ -51,8 +51,8 @@ func (config *AercConfig) parseGeneral(file *ini.File) error { end: if !isatty.IsTerminal(os.Stdout.Fd()) { logFile = os.Stdout - // redirected to file, force DEBUG level - config.General.LogLevel = log.DEBUG + // redirected to file, force TRACE level + config.General.LogLevel = log.TRACE } else if config.General.LogFile != "" { path, err := homedir.Expand(config.General.LogFile) if err != nil { |