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

Fix wrong log routing on EL7 #52

Merged
merged 1 commit into from
Apr 16, 2024
Merged

Fix wrong log routing on EL7 #52

merged 1 commit into from
Apr 16, 2024

Conversation

GElkayam
Copy link
Contributor

@GElkayam GElkayam commented Aug 2, 2022

  • Avoid haproxy logs that are echoed from systemd-journal (errors getting send again as severity 6) by limiting source to UDP input
  • Correct scoping to avoid unreachable code due to stop, and errors not logged to correct log
  • Fix indentation

* Avoid haproxy logs that are echoed from systemd-journal (errors getting send again as severity 6) by limiting source to UDP input
* Correct scoping to avoid unreachable code due to stop, and errors not logged to correct log
* Fix indentation
@GElkayam GElkayam changed the title Fix wrong log routing Fix wrong log routing on EL7 Aug 2, 2022
@rgvsilva
Copy link

Hello @DBezemer, can we get that reviewed and merged?

@DBezemer
Copy link
Owner

DBezemer commented Dec 2, 2022

In cases with systemd-journal re-echoing errors the condition

if $programname startswith 'haproxy'

should not be true, so I struggle to see what issue this fixes. Can you let me know how I can reproduce the issue you're seeing and I'll see if there's a more elegant solution.

@GElkayam
Copy link
Contributor Author

Hi @DBezemer ,
Thanks for your response.
There are several fixes to this PR.

  1. All messages are sent to the same log - due to missing curly brackets on the if statements
  2. Messages are logged twice - On the system I worked, systemd-journal was resending, and the programname was the same. RHEL 7.6. I don't have access right now, but I can try and get the specific config if needed.

On my systems, I had to override anyway to send the logs to a custom folder, but wanted to contribute the fix upstream.

@DBezemer DBezemer merged commit a6f93e4 into DBezemer:2.4 Apr 16, 2024
@DBezemer
Copy link
Owner

Sorry for the delay, finally got around to testing this and will also merge into dev for build

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.

3 participants