summary refs log tree commit diff
path: root/man
diff options
context:
space:
mode:
authorForest <forestix@sonic.net>2022-08-23 12:47:52 -0700
committerForest <forestix@sonic.net>2022-09-10 18:28:44 -0700
commit80f7683a577357e59ec9ca557b79bbfb03b489e2 (patch)
tree40bb5e3ea1470fbe1827cdbc305b58ff1105439a /man
parentBump mtxclient to released version (diff)
downloadnheko-80f7683a577357e59ec9ca557b79bbfb03b489e2.tar.xz
Control logging via command line and environment variables
Nheko is very chatty in its log output, generating log noise (which
complicates diagnostics) and needless disk writes (which affect power
consumption and SSD life).  This patch introduces command line options
and environment variables to control log levels and output type.

The old --debug command line option still works, at least for now.
It is overridden by the new command line options when they are used.

Partially addresses #665.
Diffstat (limited to 'man')
-rw-r--r--man/nheko.1.adoc22
1 files changed, 21 insertions, 1 deletions
diff --git a/man/nheko.1.adoc b/man/nheko.1.adoc
index 82053af0..d2eacbd4 100644
--- a/man/nheko.1.adoc
+++ b/man/nheko.1.adoc
@@ -31,7 +31,27 @@ Displays help including Qt specific options.
 Displays version information.
 
 *--debug*::
-Enables debug output.
+Alias for _--log-level trace_.
+
+*-l*, *--log-level* _<level>_::
+Set the global log level, or a comma-separated list of _<component>=<level>_
+pairs, or both. For example, to set the default log level to _warn_ but
+disable logging for the _ui_ component, pass _warn,ui=off_.
++
+levels: _trace_ _debug_ _info_ _warning_ _error_ _critical_ _off_
++
+components: _crypto_ _db_ _mtx_ _net_ _qml_ _ui_
++
+Log levels can also be set in the NHEKO_LOG_LEVEL environment variable, using
+the same syntax. It will be overridden by this command line option.
+
+*-L*, *--log-type* _<type>_::
+Set the log output type. A comma-separated list is allowed. The default is _file,stderr_.
++
+types: _file_ _stderr_ _none_
++
+The log type can also be set in the NHEKO_LOG_TYPE environment variable,
+which will be overridden by this command line option.
 
 *-p* _<profile>_, *--profile* _<profile>_::
 Creates a unique profile, which allows you to log into several accounts at the