mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-10-14 09:55:33 +08:00
auto add iptables rule, fixed Wformat warnings
This commit is contained in:
8
log.cpp
8
log.cpp
@@ -20,7 +20,7 @@ void log0(const char * file,const char * function,int line,int level,const char*
|
||||
tm_info = localtime(&timer);
|
||||
|
||||
if(enable_log_color)
|
||||
printf(log_color[level]);
|
||||
puts(log_color[level]);
|
||||
|
||||
strftime(buffer, 100, "%Y-%m-%d %H:%M:%S", tm_info);
|
||||
printf("[%s][%s]",buffer,log_text[level]);
|
||||
@@ -32,7 +32,7 @@ void log0(const char * file,const char * function,int line,int level,const char*
|
||||
vfprintf(stdout, str, vlist);
|
||||
va_end(vlist);
|
||||
if(enable_log_color)
|
||||
printf(RESET);
|
||||
puts(RESET);
|
||||
|
||||
//printf("\n");
|
||||
//if(enable_log_color)
|
||||
@@ -46,13 +46,13 @@ void log_bare(int level,const char* str, ...)
|
||||
if(level>log_level) return ;
|
||||
if(level>log_trace||level<0) return ;
|
||||
if(enable_log_color)
|
||||
printf(log_color[level]);
|
||||
puts(log_color[level]);
|
||||
va_list vlist;
|
||||
va_start(vlist, str);
|
||||
vfprintf(stdout, str, vlist);
|
||||
va_end(vlist);
|
||||
if(enable_log_color)
|
||||
printf(RESET);
|
||||
puts(RESET);
|
||||
fflush(stdout);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user