-
Notifications
You must be signed in to change notification settings - Fork 27
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
Feature/syslog structured data #122
Feature/syslog structured data #122
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #122 +/- ##
===========================================
+ Coverage 61.98% 62.11% +0.13%
===========================================
Files 900 901 +1
Lines 49799 49850 +51
Branches 3745 3749 +4
===========================================
+ Hits 30866 30966 +100
+ Misses 18933 18884 -49 ☔ View full report in Codecov by Sentry. |
Hi @sametd, I'm not aware of why this PR is needed, so I'm not really qualified for a review. It looks good though! :-) |
@@ -99,6 +99,11 @@ class SysLog { | |||
return s; | |||
} | |||
|
|||
/// Optional fields for structured data (RFC 5424 section 6.3) | |||
void software(const std::string& software) { software_ = software; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these being set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the keywords that belongs to origin part of the syslog structural data described in RFC5424 -> https://datatracker.ietf.org/doc/html/rfc5424#section-7.2
Looks uncontroversial. Why is there a failing test? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Once the CI is happy, we should be good to go.
This PR implements the "origin" component of the syslog structural data as described in RFC5424, specifically in sections 6.2 and 7.2 (RFC5424 Section 7.2). Implementation also ensures that the current functionality remains unaffected if the newly introduced variables are not set. I am tagging @tlmquintino here as he may also want to take a look at this implementation.
Note: This is not a full implementation of structural data of the syslog, only implements the bits that necessary to add logserver-compatible logging. Logserver repo can be found here