From f469f317d78360f0c316152ad862628b35efc7fc Mon Sep 17 00:00:00 2001 From: aunsane Date: Sun, 15 Apr 2018 14:26:08 +0300 Subject: Tox: remove unneeded log level in release build --- protocols/Tox/src/tox_core.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 1132486213..f3fa95b84d 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -101,6 +101,12 @@ void CToxProto::OnToxLog(Tox*, TOX_LOG_LEVEL level, const char *file, uint32_t l { CToxProto *proto = (CToxProto*)user_data; - if (level > TOX_LOG_LEVEL_INFO) - proto->debugLogA("TOXCORE: %s at %s(...) in %s:%u", message, func, file, line); +#ifdef _DEBUG + if (level < TOX_LOG_LEVEL_INFO) +#else + if (level < TOX_LOG_LEVEL_ERROR) +#endif + return; + + proto->debugLogA("TOXCORE: %s at %s(...) in %s:%u", message, func, file, line); } \ No newline at end of file -- cgit v1.2.3