<p dir="ltr">Hi,<br>
Both ways answer my needs.<br>
I prefer to let a commiter/contributor choose the beter solution for the future of Syslog-ng.</p>
<p dir="ltr">By the way, I shall ask a feature un the bug tracking, or you already have one ?</p>
<p dir="ltr">Regards, Nicolas.</p>
<div class="gmail_quote">Le 11 août 2014 09:01, "Gergely Nagy" <<a href="mailto:algernon@balabit.hu">algernon@balabit.hu</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Balazs Scheidler <<a href="mailto:bazsi77@gmail.com">bazsi77@gmail.com</a>> writes:<br>
<br>
> I would prefer the creation of $(format-gelf) which would solve both the<br>
> NUL issue and makes it easier for someone else to create GELF output.<br>
<br>
FWIW, since there is no GELF C library out there, I started hacking on<br>
one (which would also support chunking, and would provide an API we can<br>
plug into LogWriter, so we won't have to make it a<br>
LogThreadedDestDriver). It will take a while to finish it, because I'm<br>
playing with getting the API right.<br>
<br>
> Or alternatively, add an option to $(format-json) to add a suffix (and<br>
> perhaps a prefix) in front of and after the resulting string. That would be<br>
> useful for other purposes as well, and then $(format-gelf) could be<br>
> implemented by my latest patches that enable the definition of template<br>
> functions within the configuration file.<br>
><br>
> E.g.<br>
><br>
> template-function "format-gelf" "$(format-json --suffix "\x0" <format-json<br>
> arguments to produce gelf>)"<br>
><br>
> destination d_graylog {<br>
> network("1.2.3.4" transport(tcp) template("$(format-gelf)"); };<br>
> };<br>
<br>
How about $(char 0) as a template function? That can be reused outside<br>
of format-json.<br>
<br>
--<br>
|8]<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>