fix(syslog): separate error cause from message in syslog errors - #13974
Open
bhuvan-somisetty wants to merge 1 commit into
Open
bhuvan-somisetty wants to merge 1 commit into
bhuvan-somisetty wants to merge 1 commit into
Conversation
send_syslog_data concatenated the underlying error straight onto the message, so logs read "...processorconnection refused". Add a ": " separator, matching the rest of the code base, and cover the send failure path with a test. Fixes apache#13973
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
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.
Description
send_syslog_datain the syslog plugin concatenated the underlying error directly onto its message, so the batch processor logged run-together text such asfailed when initiating the sys logger processorconnection refusedorfailed to log messagebuffer overflow.This adds a
": "separator to both messages, consistent with the rest of the code base (e.g.'failed to loadstring: ' .. err). Only the error strings change; no behavior, return values or config are affected.A test mocks the socket logger so that
log()fails and asserts the error line readsfailed to log message: mocked send failure. The other message (logger init failure) shares the same fix, but its test depends on the nil-logger crash fix in #13970, so it is not covered here.Which issue(s) this PR fixes:
Fixes #13973
Checklist