From c566ac56cc2cbdfde863272a99c85db75fccfe77 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Thu, 4 Aug 2016 21:02:40 +0200 Subject: [PATCH] Suppressing log messages in console for non-debug builds --- src/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 3a2fa1f..d7afc41 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -101,8 +101,10 @@ u32string readTextFile(path filePath) { } int main(int argc, char *argv[]) { +#ifdef _DEBUG auto pausableStderrSink = addPausableStdErrSink(logging::Level::Warn); pausableStderrSink->pause(); +#endif // Define command-line parameters const char argumentValueSeparator = ' '; @@ -122,7 +124,9 @@ int main(int argc, char *argv[]) { try { auto resumeLogging = gsl::finally([&]() { std::cerr << std::endl << std::endl; +#ifdef _DEBUG pausableStderrSink->resume(); +#endif std::cerr << std::endl; });