Skip to content
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

Add stdout destination #4620

Merged
merged 2 commits into from
Sep 15, 2023
Merged

Conversation

bazsi
Copy link
Collaborator

@bazsi bazsi commented Sep 1, 2023

This PR adds an stdout() destination similar to stdin() that already exists. It allows me to use syslog-ng in a piped configuration (e.g. reading messages from stdin and sending them to stdout, which I am about to use for testing purposes).

Copy link
Collaborator

@OverOrion OverOrion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, one minor thing to address, gave it a quick test run with

log {
        source{ stdin(); };
        destination{ stdout(); };
};

Lovely cat - alternative :D

modules/affile/stdout.c Outdated Show resolved Hide resolved
This destination is the same as using the file() destination with /dev/stdout
as a filename. The reason it makes sense to create a separate destination
is that /dev/stdout is not a portable filename that would work on all
UNIXes.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Copy link
Collaborator

@OverOrion OverOrion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, LGTM!

@OverOrion OverOrion merged commit 2deb8d2 into syslog-ng:master Sep 15, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants