diff options
author | chai <chaifix@163.com> | 2021-11-08 09:23:38 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-08 09:23:38 +0800 |
commit | 138d3f4d3d6e2aaf5ba34f89af15ef85ea074357 (patch) | |
tree | 31ca6e8ea6d2e960e8d35f801bd92555942822e2 /Runtime/Debug/Log.cpp | |
parent | efce5b6bd5c9d4f8214a71e0f7a7c35751710a4c (diff) |
*misc
Diffstat (limited to 'Runtime/Debug/Log.cpp')
-rw-r--r-- | Runtime/Debug/Log.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Runtime/Debug/Log.cpp b/Runtime/Debug/Log.cpp index 301e15a..484e3c7 100644 --- a/Runtime/Debug/Log.cpp +++ b/Runtime/Debug/Log.cpp @@ -95,8 +95,14 @@ void log_error(const char* fmt, ...) }
} +#define CHECK_TAG(tag)\ +if (s_OpenTags.count(tag) == 0)\ + return; + void log_info_tag(const char* tag, const char* fmt, ...) { + CHECK_TAG(tag); + Lock(s_Mutex) { SetOutputColor(0); va_list pArgs = NULL;
@@ -110,6 +116,8 @@ void log_info_tag(const char* tag, const char* fmt, ...) void log_warning_tag(const char* tag, const char* fmt, ...) { + CHECK_TAG(tag); + Lock(s_Mutex) { SetOutputColor(1); va_list pArgs = NULL;
@@ -123,6 +131,8 @@ void log_warning_tag(const char* tag, const char* fmt, ...) void log_error_tag(const char* tag, const char* fmt, ...) { + CHECK_TAG(tag); + Lock(s_Mutex) { SetOutputColor(2); va_list pArgs = NULL;
|