From e6bf93e8cde67539583cb7fce5a47095fa45208a Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 2 Feb 2016 11:34:16 +0100 Subject: [PATCH] Fixed: Don't display logs in console for unit tests --- code/nel/tools/nel_unit_test/nel_unit_test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/code/nel/tools/nel_unit_test/nel_unit_test.cpp b/code/nel/tools/nel_unit_test/nel_unit_test.cpp index 8289ea490..753dfd46a 100644 --- a/code/nel/tools/nel_unit_test/nel_unit_test.cpp +++ b/code/nel/tools/nel_unit_test/nel_unit_test.cpp @@ -114,6 +114,20 @@ int main(int argc, char *argv[]) // init Nel context new NLMISC::CApplicationContext; + // disable nldebug messages in logs in Release +#ifdef NL_RELEASE + NLMISC::DisableNLDebug = true; +#endif + + NLMISC::createDebug(NULL); + +#ifndef NL_DEBUG + NLMISC::INelContext::getInstance().getDebugLog()->removeDisplayer("DEFAULT_SD"); + NLMISC::INelContext::getInstance().getInfoLog()->removeDisplayer("DEFAULT_SD"); + NLMISC::INelContext::getInstance().getWarningLog()->removeDisplayer("DEFAULT_SD"); + NLMISC::INelContext::getInstance().getErrorLog()->removeDisplayer("DEFAULT_SD"); +#endif // NL_DEBUG + bool noerrors = false; try