#include <common/config.h>
#include <common/ist.h>
#include <common/mini-clist.h>
+#include <common/time.h>
#include <proto/cli.h>
#include <proto/log.h>
#include <proto/ring.h>
struct ist pfx[4];
size_t npfx = 0;
- if (sink->fmt == SINK_FMT_SHORT) {
+ if (sink->fmt == SINK_FMT_SHORT || sink->fmt == SINK_FMT_TIMED) {
short_hdr[0] = '<';
short_hdr[1] = '0' + sink->syslog_minlvl;
short_hdr[2] = '>';
npfx++;
}
+ if (sink->fmt == SINK_FMT_ISO || sink->fmt == SINK_FMT_TIMED) {
+ pfx[npfx].ptr = timeofday_as_iso_us(1);
+ pfx[npfx].len = 27;
+ npfx++;
+ }
+
if (sink->type == SINK_TYPE_FD) {
return fd_write_frag_line(sink->ctx.fd, sink->maxlen, pfx, npfx, msg, nmsg, 1);
}