diff options
-rw-r--r-- | protocols/Tox/src/tox_core.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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 |