Suppressing log messages in console for non-debug builds

This commit is contained in:
Daniel Wolf
2016-08-04 21:02:40 +02:00
parent 229105a965
commit c566ac56cc

View File

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