One culprit is that this snippet is coming from the builtin scl macros. Unfortunately we don't really handle this case nicely and there's even a bug about that.

The workaround is simply to remove the cim folder from /usr/share/syslog-ng/include/scl.

On Feb 23, 2016 6:17 PM, "Czanik, Péter" <peter.czanik@balabit.com> wrote:
Hi,

You don't have json support enabled, but have a config with format-json. Either compile syslog-ng with json support or remove this config snippet.

Bye,

Peter Czanik (CzP) <peter.czanik@balabit.com>
Balabit / syslog-ng upstream
http://czanik.blogs.balabit.com/
https://twitter.com/PCzanik

On Tue, Feb 23, 2016 at 6:11 PM, amey jain <amey.jain7@gmail.com> wrote:
Hi,
I was running ./syslog-ng and I got these errors. I am unable to solve them. I am copying the output here. Please tell me what to do to correct it.
$ sbin/syslog-ng --module-path=/home/amey/install/syslog-ng
Error parsing config, Error compiling template (Unknown template function "format-json") in /home/amey/install/syslog-ng/share/syslog-ng/include/scl/cim/template.conf at line 23, column 32:
                                                                              included from /home/amey/install/syslog-ng/etc/scl.conf line 29, column 1
                                                                              included from /home/amey/install/syslog-ng/etc/syslog-ng.conf line 8, column 1

template-function "format-cim" "$(format-json --pair @timestamp='${R_ISODATE}' --pair @message='${MSG}' --key .cim.* --shift 5 --key _* --key .* --replace-prefix .=_ --key *.*)\n";
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

syslog-ng documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
mailing list: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Regards

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq




______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq