util.startup: Teach prosodyctl to be completely --silent

This commit is contained in:
Kim Alvefur 2021-11-28 23:07:51 +01:00
parent 14f31180b5
commit f30bbd6dcf
3 changed files with 9 additions and 0 deletions

View file

@ -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" } });