From 696ce0b84afbc7431084df1e8df311dd0a2b272d Mon Sep 17 00:00:00 2001 From: armatusmiles <akurotych@gmail.com> Date: Thu, 21 Feb 2019 21:43:05 +0700 Subject: [PATCH] [+] possibility print log info without log_tag --- core/dap_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/dap_common.c b/core/dap_common.c index 5015739..5377316 100644 --- a/core/dap_common.c +++ b/core/dap_common.c @@ -194,8 +194,10 @@ void _vlog_it(const char * log_tag,enum log_level ll, const char * format,va_lis if (s_log_file ) fprintf(s_log_file,"[!!!] "); printf("\x1b[1;5;31m[!!!] "); } - if (s_log_file ) fprintf(s_log_file,log_tag_fmt_str,log_tag); - printf(log_tag_fmt_str,log_tag); + if(log_tag != NULL) { + if (s_log_file ) fprintf(s_log_file,log_tag_fmt_str,log_tag); + printf(log_tag_fmt_str,log_tag); + } if (s_log_file ) vfprintf(s_log_file,format,ap); vprintf(format,ap2); -- GitLab