From b0343acf8ca6e446d381989d6fe59f5039ae4bde Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 13 Nov 2021 00:24:38 +0800 Subject: [PATCH] =?UTF-8?q?Refine:=20=E6=8F=90=E7=82=BC=E7=B2=BE=E7=AE=80?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdpart/ZLToolKit | 2 +- src/Common/macros.h | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/3rdpart/ZLToolKit b/3rdpart/ZLToolKit index 5b6e07a1..60eb96de 160000 --- a/3rdpart/ZLToolKit +++ b/3rdpart/ZLToolKit @@ -1 +1 @@ -Subproject commit 5b6e07a18992b4d820531e2ccd2ccd7334a2090b +Subproject commit 60eb96ded0493fb368dd907997211b6beffb6777 diff --git a/src/Common/macros.h b/src/Common/macros.h index 388fb0ef..c0cefe92 100644 --- a/src/Common/macros.h +++ b/src/Common/macros.h @@ -13,6 +13,7 @@ #include #include +#include "Util/logger.h" #if defined(__MACH__) #include #include @@ -77,19 +78,11 @@ namespace mediakit { extern const char kServerName[]; -void printArgs(std::ostream &out); - -template -void printArgs(std::ostream &out, First &&first, ARGS &&...args) { - out << std::forward(first); - printArgs(out, std::forward(args)...); -} - template void Assert_ThrowCpp(int failed, const char *exp, const char *func, const char *file, int line, ARGS &&...args) { if (failed) { std::stringstream ss; - printArgs(ss, std::forward(args)...); + toolkit::LoggerWrapper::appendLog(ss, std::forward(args)...); Assert_Throw(failed, exp, func, file, line, ss.str().data()); } }