From 89389601d5973f868d781a07f9be542a1090144a Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Tue, 19 Oct 2021 10:11:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9Dwindow=E4=B8=8B=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/include/mk_util.h | 10 +++++----- api/tests/server.c | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api/include/mk_util.h b/api/include/mk_util.h index 0e1a20d6..c8465d89 100644 --- a/api/include/mk_util.h +++ b/api/include/mk_util.h @@ -66,11 +66,11 @@ API_EXPORT void API_CALL mk_log_printf(int level, const char *file, const char * // 以下宏可以替换printf使用 #define log_printf(lev, fmt, ...) mk_log_printf(lev, __FILE__, __FUNCTION__, __LINE__, fmt, ##__VA_ARGS__) -#define log_trace(...) log_printf(0,##__VA_ARGS__) -#define log_debug(...) log_printf(1, ##__VA_ARGS__) -#define log_info(...) log_printf(2, ##__VA_ARGS__) -#define log_warn(...) log_printf(3, ##__VA_ARGS__) -#define log_error(...) log_printf(4, ##__VA_ARGS__) +#define log_trace(fmt, ...) log_printf(0, fmt, ##__VA_ARGS__) +#define log_debug(fmt,...) log_printf(1, fmt, ##__VA_ARGS__) +#define log_info(fmt, ...) log_printf(2, fmt, ##__VA_ARGS__) +#define log_warn(fmt, ...) log_printf(3, fmt, ##__VA_ARGS__) +#define log_error(fmt, ...) log_printf(4, fmt, ##__VA_ARGS__) #ifdef __cplusplus } diff --git a/api/tests/server.c b/api/tests/server.c index 2786fd73..c5f40104 100644 --- a/api/tests/server.c +++ b/api/tests/server.c @@ -438,6 +438,8 @@ int main(int argc, char *argv[]) { }; mk_events_listen(&events); + log_info("media server %s", "stared!"); + signal(SIGINT, s_on_exit );// 设置退出信号 while (flag) { #ifdef _WIN32