|
@@ -391,19 +391,19 @@ void log_msg_no_file_num(const char *strCatName, const int iPriority, const char
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-/** 日志记录,不记录文件名和行号,没有任何layout转换,直接输出相应的字符文本到日志中
|
|
|
-此条记录没有行号,也没有线程号,也没有回车等
|
|
|
-日志记录为一个字符串指针指向的内容
|
|
|
-@return void
|
|
|
-作者:jesse 日期:2008-9-14
|
|
|
-*/
|
|
|
-void log_msg_no_file_num_no_layout(
|
|
|
- const char *strCatName, ///category名
|
|
|
- const int iPriority, ///日志记录级别
|
|
|
- const char *strFormat, ///日志内容格式
|
|
|
- ... ///日志内容
|
|
|
- )
|
|
|
+/************************************************************************/
|
|
|
+/* 函数:[3/30/2019 Wang];
|
|
|
+/* 描述:日志记录,不记录文件名和行号,没有任何layout转换,直接输出相应的字符文本到日志中;
|
|
|
+/* 此条记录没有行号,也没有线程号,也没有回车等
|
|
|
+/* 日志记录为一个字符串指针指向的内容
|
|
|
+/* 参数:;
|
|
|
+/* [IN] strCatName:category名;
|
|
|
+/* [IN] iPriority:日志记录级别;
|
|
|
+/* [IN] strFormat:日志内容格式;
|
|
|
+/* [IN] ...:日志内容;
|
|
|
+/* 返回:void;
|
|
|
+/************************************************************************/
|
|
|
+void log_msg_no_file_num_no_layout(const char *strCatName, const int iPriority, const char *strFormat, ...)
|
|
|
{
|
|
|
const log4c_category_t* a_category = log4c_category_get(strCatName);
|
|
|
if (log4c_category_is_priority_enabled(a_category, iPriority))
|
|
@@ -557,17 +557,18 @@ const LOG_PARAM log_condition_vsnprintf_wrapper(
|
|
|
/* 描述:;
|
|
|
/* 参数:;
|
|
|
/* [IN] iPriority:日志记录级别;
|
|
|
+/* [IN] strFormat:日志内容格式;
|
|
|
/* [IN] strHexBuf:缓冲区首地址;
|
|
|
/* [IN] iHexBufLen:缓冲区长度;
|
|
|
/* [IN] ...:日志内容;
|
|
|
/* 返回:void;
|
|
|
/************************************************************************/
|
|
|
-void log_hex_dump_vsnprintf_wrapper(const int iPriority, const char* strHexBuf, const int iHexBufLen, ...)
|
|
|
+void log_hex_dump_vsnprintf_wrapper(const int iPriority, const char* strFormat, const char* strHexBuf, const int iHexBufLen)
|
|
|
{
|
|
|
char *strBuffer = (char *)malloc(LOG4C_BUFFER_SIZE_MAX);
|
|
|
memset(strBuffer, 0, LOG4C_BUFFER_SIZE_MAX);
|
|
|
log4c_sprintf_data((char*)(strHexBuf), (iHexBufLen), strBuffer);
|
|
|
- log_msg_no_file_num(DEFAULT_LOG_CATEGORY_NAME, iPriority, strBuffer );
|
|
|
+ log_msg_no_file_num(DEFAULT_LOG_CATEGORY_NAME, iPriority, strFormat, strBuffer );
|
|
|
}
|
|
|
|
|
|
/************************************************************************/
|