Suppressing log messages in console for non-debug builds
This commit is contained in:
parent
229105a965
commit
c566ac56cc
|
@ -101,8 +101,10 @@ u32string readTextFile(path filePath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
#ifdef _DEBUG
|
||||||
auto pausableStderrSink = addPausableStdErrSink(logging::Level::Warn);
|
auto pausableStderrSink = addPausableStdErrSink(logging::Level::Warn);
|
||||||
pausableStderrSink->pause();
|
pausableStderrSink->pause();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Define command-line parameters
|
// Define command-line parameters
|
||||||
const char argumentValueSeparator = ' ';
|
const char argumentValueSeparator = ' ';
|
||||||
|
@ -122,7 +124,9 @@ int main(int argc, char *argv[]) {
|
||||||
try {
|
try {
|
||||||
auto resumeLogging = gsl::finally([&]() {
|
auto resumeLogging = gsl::finally([&]() {
|
||||||
std::cerr << std::endl << std::endl;
|
std::cerr << std::endl << std::endl;
|
||||||
|
#ifdef _DEBUG
|
||||||
pausableStderrSink->resume();
|
pausableStderrSink->resume();
|
||||||
|
#endif
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue