Simplify logging UTC option to only show time
We probably almost never care about the date, but it takes a lot of space. Remove it; if somebody needs the full time stamp including the date, we could still add it with a new option.
This commit is contained in:
@@ -575,8 +575,7 @@ static inline int log_header(log_component_t *c,
|
||||
struct tm utc_time;
|
||||
if (gmtime_r(&t.tv_sec, &utc_time) == NULL)
|
||||
abort();
|
||||
snprintf(timeString, sizeof(timeString), "%04d-%02d-%02d %02d:%02d:%02d.%06lu UTC ",
|
||||
utc_time.tm_year + 1900, utc_time.tm_mon + 1, utc_time.tm_mday,
|
||||
snprintf(timeString, sizeof(timeString), "[%02d:%02d:%02d.%06lu] ",
|
||||
utc_time.tm_hour, utc_time.tm_min, utc_time.tm_sec, t.tv_nsec / 1000);
|
||||
} else {
|
||||
snprintf(timeString, sizeof(timeString), "%lu.%06lu ",
|
||||
|
||||
Reference in New Issue
Block a user