diff options
author | Kim Alvefur <zash@zash.se> | 2021-11-28 23:07:51 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-11-28 23:07:51 +0100 |
commit | f30bbd6dcf9c3f00c7106daf40fb6bf513b888c6 (patch) | |
tree | 0445e2299dd6d37b6b2be9b3cf95d16af72297af | |
parent | 14f31180b5f2f33512deea143a5cd689c175c184 (diff) | |
download | prosody-f30bbd6dcf9c3f00c7106daf40fb6bf513b888c6.tar.gz prosody-f30bbd6dcf9c3f00c7106daf40fb6bf513b888c6.zip |
util.startup: Teach prosodyctl to be completely --silent
-rw-r--r-- | man/prosodyctl.man | 3 | ||||
-rw-r--r-- | man/prosodyctl.markdown | 3 | ||||
-rw-r--r-- | util/startup.lua | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/man/prosodyctl.man b/man/prosodyctl.man index f22418cc..cb8284ec 100644 --- a/man/prosodyctl.man +++ b/man/prosodyctl.man @@ -141,6 +141,9 @@ Increase log level to show debug messages. .TP \f[B]\f[CB]--quiet\f[B]\f[R] Reduce log level to only show errors. +.TP +\f[B]\f[CB]--silent\f[B]\f[R] +Disable logging completely, leaving only command output. .SH FILES .TP \f[B]\f[CB]/etc/prosody/prosody.cfg.lua\f[B]\f[R] diff --git a/man/prosodyctl.markdown b/man/prosodyctl.markdown index 38540a59..c5b93627 100644 --- a/man/prosodyctl.markdown +++ b/man/prosodyctl.markdown @@ -143,6 +143,9 @@ details of how these commands work you should see ejabberdctl(8). `--quiet` : Reduce log level to only show errors. +`--silent` +: Disable logging completely, leaving only command output. + # FILES `/etc/prosody/prosody.cfg.lua` diff --git a/util/startup.lua b/util/startup.lua index 893a4995..f6c931dd 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -475,6 +475,9 @@ function startup.force_console_logging() log_level = "debug"; elseif prosody.opts.quiet then log_level = "error"; + elseif prosody.opts.silent then + config.set("*", "log", {}); -- ssssshush! + return end end config.set("*", "log", { { levels = { min = log_level or "info" }, to = "console" } }); |