summaryrefslogtreecommitdiff
path: root/mu
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-11-01 09:31:07 +0200
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2025-11-01 09:44:02 +0200
commitd3ffb4ca2c77b92dc98caa336c5d200a790912d2 (patch)
tree3b0b87881dd6af59f751567e61c6b4ca6d55da24 /mu
parent7ac3b383237abd1eef6981e4d8cedaec4b7c8ad7 (diff)
logging: don't g_message with --quiet
When `--quiet` is passed (and not --debug), do not log with g_message at startup.
Diffstat (limited to 'mu')
-rw-r--r--mu/mu.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/mu/mu.cc b/mu/mu.cc
index 0a580bc..c0b2eb7 100644
--- a/mu/mu.cc
+++ b/mu/mu.cc
@@ -112,8 +112,12 @@ main(int argc, char* argv[]) try
Logger::Options lopts{Logger::Options::None};
if (opts.log_stderr)
lopts |= Logger::Options::StdOutErr;
+
if (opts.debug)
lopts |= Logger::Options::Debug;
+ else if (opts.quiet) // ie. only consider when not in debug mode
+ lopts |= Logger::Options::Quiet;
+
if (!!g_getenv("MU_TEST"))
lopts |= Logger::Options::File;