[Bug 248] New: template parsing does not split ", " argument of --scope
https://bugzilla.balabit.com/show_bug.cgi?id=248 Summary: template parsing does not split "," argument of --scope Product: syslog-ng Version: 3.4.x Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: bugzilla.balabit@faxm0dem.org Type of the Report: --- Estimated Hours: 0.0 As stated in paragraph 2.8.4.(Structuring macros, metadata, and other value-pairs) of the documentation, in example 2.1. (Using the value-pairs() option) it should be possible to pass multiple coma separated values to a template. However, this seems to be broken: Error parsing config, Error compiling template (Error parsing value-pairs: unknown scope all-nv-pairs,rfc5423) in /opt/etc/syslog-ng.conf at line 44, column 14: template("$(format-json --scope all-nv-pairs,rfc5423 )\\n"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The workaround is to specify '--scope $scope' multiple times -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=248 --- Comment #1 from Fabien Wernli <bugzilla.balabit@faxm0dem.org> 2013-08-22 15:34:47 --- there was a typo in my initial comment, which doesn't change anything: s/rfc5423/rfc5424/ -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
Thanks for the report, these actually help a lot to refine the documentation. Regarding the comma, iirc it works when using the value pairs definition with the config file syntax and not when using the command line syntax. This could and should be fixed in the code instead of the documentation. Anyone volunteering with a patch? Should be easy. On Aug 22, 2013 3:33 PM, <bugzilla@bugzilla.balabit.com> wrote:
https://bugzilla.balabit.com/show_bug.cgi?id=248
Summary: template parsing does not split "," argument of --scope Product: syslog-ng Version: 3.4.x Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: bugzilla.balabit@faxm0dem.org Type of the Report: --- Estimated Hours: 0.0
As stated in paragraph 2.8.4.(Structuring macros, metadata, and other value-pairs) of the documentation, in example 2.1. (Using the value-pairs() option) it should be possible to pass multiple coma separated values to a template. However, this seems to be broken:
Error parsing config, Error compiling template (Error parsing value-pairs: unknown scope all-nv-pairs,rfc5423) in /opt/etc/syslog-ng.conf at line 44, column 14:
template("$(format-json --scope all-nv-pairs,rfc5423 )\\n"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The workaround is to specify '--scope $scope' multiple times
-- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
______________________________________________________________________________ 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
https://bugzilla.balabit.com/show_bug.cgi?id=248 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |algernon@balabit.hu AssignedTo|bazsi@balabit.hu |algernon@balabit.hu --- Comment #2 from Gergely Nagy <algernon@balabit.hu> 2013-08-26 10:46:46 --- This one's a tough one, in the sense that I'd be tempted to say this is a documentation bug.. I can fix it in the code, but that would complicate it a bit. The reason commas work in the value-pairs() syntax is because the lexer does the splitting. I'd have to do the split manually in case of format-json. On the other hand, that only takes a few lines. I'll see if I can come up with a reasonably small patch. Thanks for the report! -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=248 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=248 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |FIXED Status|ASSIGNED |RESOLVED --- Comment #3 from Gergely Nagy <algernon@balabit.hu> 2013-08-26 12:11:24 --- It only took a few lines to add this functionality, and it is fixed in 3.4 git, with this patch: https://github.com/balabit/syslog-ng-3.4/commit/b87908a5c854d42bf3cf6e7255b4... -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (2)
-
Balazs Scheidler
-
bugzilla@bugzilla.balabit.com