Skip to content

Commit

Permalink
Add -q/--quiet option to disable logging
Browse files Browse the repository at this point in the history
  • Loading branch information
synesthesiam committed Nov 14, 2023
1 parent cf5b143 commit 7ec6dda
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ void printUsage(char *argv[]) {
<< endl;
cerr << " --debug print DEBUG messages to the console"
<< endl;
cerr << " -q --quiet disable logging"
<< endl;
cerr << endl;
}

Expand Down Expand Up @@ -522,6 +524,9 @@ void parseArgs(int argc, char *argv[], RunConfig &runConfig) {
} else if (arg == "--debug") {
// Set DEBUG logging
spdlog::set_level(spdlog::level::debug);
} else if (arg == "-q" || arg == "--quiet") {
// diable logging
spdlog::set_level(spdlog::level::off);
} else if (arg == "-h" || arg == "--help") {
printUsage(argv);
exit(0);
Expand Down

0 comments on commit 7ec6dda

Please sign in to comment.