From 15a9427112481bd8aa2b01cbaa3a09a2e0451a00 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 21 Dec 2019 18:08:42 +0200 Subject: [PATCH] wip --- include/spdlog/cfg/argv.h | 13 +++++++++++-- include/spdlog/cfg/env.h | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/spdlog/cfg/argv.h b/include/spdlog/cfg/argv.h index b690032c..46624439 100644 --- a/include/spdlog/cfg/argv.h +++ b/include/spdlog/cfg/argv.h @@ -6,8 +6,17 @@ #include // -// Init levels from argv SPDLOG_LEVEL -// Example: my_program.exe "SPDLOG_LEVEL=trace" +// Init log levels using each argv entry that starts with "SPDLOG_LEVEL=" +// +// set all loggers to debug level: +// example.exe "SPDLOG_LEVEL=debug" + +// set logger1 to trace level +// example.exe "SPDLOG_LEVEL=logger1=trace" + +// turn off all logging except for logger1 and logger2: +// example.exe "SPDLOG_LEVEL=off,logger1=debug,logger2=info" + namespace spdlog { namespace cfg { diff --git a/include/spdlog/cfg/env.h b/include/spdlog/cfg/env.h index 3700eeb7..9568f3bb 100644 --- a/include/spdlog/cfg/env.h +++ b/include/spdlog/cfg/env.h @@ -19,6 +19,7 @@ // turn off all logging except for logger1: // export SPDLOG_LEVEL="off,logger1=debug" // + // turn off all logging except for logger1 and logger2: // export SPDLOG_LEVEL="off,logger1=debug,logger2=info"