MEDIUM: sink: build header in sink_write for log formats
This patch extends the sink_write prototype and code to
handle the rfc5424 and rfc3164 header.
It uses header building tools from log.c. Doing this some
functions/vars have been externalized.
facility and minlevel have been removed from the struct sink
and passed to args at sink_write because they depends of the log
and not of the sink (they remained unused by rest of the code
until now).
diff --git a/src/trace.c b/src/trace.c
index 06fec4a..d3c27d8 100644
--- a/src/trace.c
+++ b/src/trace.c
@@ -229,7 +229,7 @@
}
if (src->sink)
- sink_write(src->sink, line, words);
+ sink_write(src->sink, line, words, 0, 0, NULL, NULL, NULL);
end:
/* check if we need to stop the trace now */