提交 78810b80 编写于 作者: X xionglei6@huawei.com

fix code style

Signed-off-by: Nxionglei6@huawei.com <xionglei6@huawei.com>
上级 4497691d
......@@ -149,19 +149,19 @@ void InitLog(InitLogLevel logLevel, const char *fileName, int line, const char *
g_outfile = fopen(PARAM_AGENT_LOG_PATH, "w+");
}
if (g_outfile == NULL) {
fprintf(stdout, "%s[%d-%d-%d %d:%d:%d][pid=%d][%s:%d][%s][%s] ", kLevel, (t->tm_year + BASE_YEAR),
(void)fprintf(stdout, "%s[%d-%d-%d %d:%d:%d][pid=%d][%s:%d][%s][%s] ", kLevel, (t->tm_year + BASE_YEAR),
(t->tm_mon + 1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, gettid(), fileName,
line, INIT_LOG_TAG, LOG_LEVEL_STR[logLevel]);
printf("output %s error: %s \n", fmt, strerror(errno));
return;
}
fprintf(g_outfile, "%s[%d-%d-%d %d:%d:%d][pid=%d][%s:%d][%s][%s] ", kLevel, (t->tm_year + BASE_YEAR),
(void)fprintf(g_outfile, "%s[%d-%d-%d %d:%d:%d][pid=%d][%s:%d][%s][%s] ", kLevel, (t->tm_year + BASE_YEAR),
(t->tm_mon + 1), t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, getpid(), fileName,
line, INIT_LOG_TAG, LOG_LEVEL_STR[logLevel]);
va_list list;
va_start(list, fmt);
vfprintf(g_outfile, fmt, list);
(void)vfprintf(g_outfile, fmt, list);
va_end(list);
fflush(g_outfile);
(void)fflush(g_outfile);
}
#endif
\ No newline at end of file
......@@ -26,7 +26,6 @@
#include <unistd.h>
#include "init_param.h"
#include "init_utils.h"
#include "param_message.h"
#include "param_manager.h"
#include "param_request.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册