On Tue, 19 Mar 2024 08:37:30 +0100 Morten Brørup <m...@smartsharesystems.com> wrote:
> > static ssize_t > > console_log_write(__rte_unused void *c, const char *buf, size_t size) > > { > > + struct timespec ts; > > ssize_t ret; > > > > - /* write on stderr */ > > - ret = fwrite(buf, 1, size, stderr); > > + if (timestamp_enabled) { > > + clock_gettime(CLOCK_MONOTONIC, &ts); > > + ts.tv_sec -= log_started.tv_sec; > > + ts.tv_nsec -= log_started.tv_nsec; > > Please log the absolute CLOCK_MONOTONIC instead of subtracting log_started, > so timestamps can be easily compared with timestamps from other processes. No, was trying to do what kernel dmesg does.