forked from syslog-ng/syslog-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
csv-parser: add parsing to log message matches
Instead of always having to come up with names for the columns we parse, this patch makes it possible to parse into the "matches" array, e.g. $1, $2, $3... To do this, simply omit the previously mandatory columns() option to csv-parser(). @Version: current log { source { tcp(port(2000) flags(no-parse)); }; parser { csv-parser(delimiters(',') dialect(escape-backslash)); }; destination { stdout(template("$ISODATE $*\n")); }; }; This makes the parsed content also available as a syslog-ng list, as the "$*" macro can be used to produce a list out of the parsed values. Signed-off-by: yashmathne <yash6866@gmail.com> Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
- Loading branch information
1 parent
57abb33
commit 99f3284
Showing
4 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters