-
Notifications
You must be signed in to change notification settings - Fork 490
F/add format cim template function #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or 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
In a number of cases this syntax: template foo { template("template text"); }; Has a lot of boilerplate. In case template-escape() option is not needed (which is less-and-less needed and could probably be deprecated), this syntax is just enough: template foo "template text"; This plays nicely with the new feature that template functions can be defined in configuration files with a similar syntax. Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Traditionally Plugin instances are allocated as global variables, which didn't need free operation. This patch allows allocating Plugin instances dynamically, which in turn requires a free_fn. Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Just like with Plugins, LogTemplateFunctions couldn't really be subclassed, as we basically assumed those are defined in a statically allocated struct. With the upcoming support for user-defined template functions, we do need to allocate these on the heap, thus a free operation is needed too. This patch adds this free_fn, which should both free any dynamic data inside the struct _and_ the struct itself. Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
The upcoming user template functions code does not have a state, and we don't want to implement boilerplate free_state calls. Make state optional by specifying size_of_state as zero. Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
This patch adds a new API, user_template_function_register() that allows registering a LogTemplate instance as a template function, dynamically. Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
This patch completes the support for user defined template functions. With this patch you can define template functions in your configuration the same way you would define a template. template-function foobar "this is a template function running on $HOST"; destination d_file { file("something.log" template("$(foobar)\n")); }; Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
This patch adds a template function $(format-cim) into an SCL module that implements Common Information Model (aka cim) formatting, as used by Kibana (and Splunk). Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
algernon
added a commit
that referenced
this pull request
Aug 18, 2014
F/add format cim template function
HofiOne
pushed a commit
to HofiOne/syslog-ng
that referenced
this pull request
Jul 22, 2024
Signed-off-by: László Várady <laszlo.varady@anno.io>
kovgeri01
pushed a commit
to kovgeri01/syslog-ng
that referenced
this pull request
Aug 13, 2024
Signed-off-by: László Várady <laszlo.varady@anno.io>
kovgeri01
pushed a commit
to kovgeri01/syslog-ng
that referenced
this pull request
Aug 13, 2024
Null-pointer fixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.