Use snptinrf ro the datetime logging, get rid of timezone (causes the
test to behave differently.
This commit is contained in:
+9
-3
@@ -306,11 +306,17 @@ static inline void uc_vlog_internal(const struct uc_log_args *args, const char *
|
||||
if(dest->dest_type != UC_LDEST_SYSLOG && dest->type.file.file != NULL) {
|
||||
char time_buf[48];
|
||||
time_t now;
|
||||
struct tm tmbuf;
|
||||
struct tm t;
|
||||
|
||||
now = time(NULL);
|
||||
localtime_r(&now, &tmbuf);
|
||||
strftime(time_buf, sizeof time_buf, "%d %b %Y %H:%M:%S %Z", &tmbuf);
|
||||
localtime_r(&now, &t);
|
||||
snprintf(time_buf, sizeof time_buf, "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
t.tm_year + 1900,
|
||||
t.tm_mon + 1,
|
||||
t.tm_mday,
|
||||
t.tm_hour,
|
||||
t.tm_min,
|
||||
t.tm_sec);
|
||||
|
||||
if(dest->log_location) {
|
||||
fprintf(dest->type.file.file, "[%s] %s %s:%d [%s] : ", uc_ll_2_str(args->log_level),
|
||||
|
||||
Reference in New Issue
Block a user