Skip to content

Commit

Permalink
Moves timestamp at the beginning of the lines
Browse files Browse the repository at this point in the history
  • Loading branch information
fortizc committed Jun 13, 2024
1 parent 3cb27d0 commit 32f2a83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logserver/logserver_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ static int print_pvfmt_log(int fd, const struct logserver_log *log,

if (ts_fmt) {
if (lf)
fmt = "[%s] %" PRId64 " %s [%s]\t -- [%s]: %.*s\n";
fmt = "[%s] [%s] %" PRId64 " %s\t -- [%s]: %.*s\n";
else
fmt = "[%s] %" PRId64 " %s [%s]\t -- [%s]: %.*s";
fmt = "[%s] [%s] %" PRId64 " %s\t -- [%s]: %.*s";

char ts[256] = { 0 };
if (logserver_timestamp_get_formated(ts, 256, &log->time,
ts_fmt) != 0)
strncpy(ts, "--", 3);

len = dprintf(fd, fmt, log->plat, log->tsec,
pv_log_level_name(log->lvl), ts, util_src,
len = dprintf(fd, fmt, ts, log->plat, log->tsec,
pv_log_level_name(log->lvl), util_src,
log->data.len, log->data.buf);
} else {
if (lf)
Expand Down

0 comments on commit 32f2a83

Please sign in to comment.