logging: don't g_message with --quiet

When `--quiet` is passed (and not --debug), do not log with g_message at
startup.
This commit is contained in:
Dirk-Jan C. Binnema
2025-11-01 09:31:07 +02:00
committed by Seth Ladygo
parent 976b6210fc
commit 4acf708eb9
3 changed files with 12 additions and 7 deletions

View File

@ -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;