Revert unnecessary changes relative to origin/develop

Reviewed with Andrew
This commit is contained in:
Michael Cook
2020-07-19 13:42:35 -04:00
parent 5ed1390898
commit 5714440427
15 changed files with 112 additions and 160 deletions
+17 -17
View File
@@ -45,6 +45,7 @@
#include "common/config/config_userapi.h"
#include <time.h>
#include <sys/time.h>
// main log variables
log_mem_cnt_t log_mem_d[2];
@@ -477,29 +478,28 @@ char *log_getthreadname(char *threadname,
}
static int log_header(char *log_buffer,
int buffsize,
int comp,
int level,
const char *format)
int buffsize,
int comp,
int level,
const char *format)
{
char threadname[PR_SET_NAME];
struct timeval tv;
gettimeofday(&tv, NULL);
struct tm tm;
localtime_r(&tv.tv_sec, &tm);
return snprintf(log_buffer, buffsize, "%02d:%02d:%02d.%06ld %s%s[%s]%c %s %s%s",
tm.tm_hour,
tm.tm_min,
tm.tm_sec,
tv.tv_usec,
log_level_highlight_end[level],
((g_log->flag & FLAG_NOCOLOR) ? "" : log_level_highlight_start[level]),
g_log->log_component[comp].name,
((g_log->flag & FLAG_LEVEL) ? g_log->level2string[level] : ' '),
((g_log->flag & FLAG_THREAD) ? log_getthreadname(threadname, PR_SET_NAME + 1) : ""),
format,
log_level_highlight_end[level]);
return snprintf(log_buffer, buffsize, "%02d:%02d:%02d.%06ld %s%s[%s]%c %s %s%s",
tm.tm_hour,
tm.tm_min,
tm.tm_sec,
tv.tv_usec,
log_level_highlight_end[level],
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
g_log->log_component[comp].name,
( (g_log->flag & FLAG_LEVEL)?g_log->level2string[level]:' '),
( (g_log->flag & FLAG_THREAD)?log_getthreadname(threadname,PR_SET_NAME+1):""),
format,
log_level_highlight_end[level]);
}
void logRecord_mt(const char *file,