-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fallback on LevelRaw If the Level is not in the RenderingInfo section of the event #4257
Conversation
…ck on the raw level. Applies to Windows Vista and above only. https://discuss.elastic.co/t/event-fields-missing-if-renderinginfo-is-empty/84709
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run. |
1 similar comment
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run. |
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.
Thanks for contributing! The changes look good. I left some minor comments.
winlogbeat/eventlog/wineventlog.go
Outdated
@@ -216,6 +217,11 @@ func (l *winEventLog) buildRecordFromXML(x []byte, recoveredErr error) (Record, | |||
e.RenderErr = recoveredErr.Error() | |||
} | |||
|
|||
if e.Level == "" { | |||
//Let's fallback on LevelRaw if the level is not set in the RenderingInfo |
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.
Could you please change this to
// Fallback on LevelRaw if the Level is not set in the RenderingInfo.
winlogbeat/eventlog/wineventlog.go
Outdated
@@ -11,6 +11,7 @@ import ( | |||
"github.com/elastic/beats/libbeat/common" | |||
"github.com/elastic/beats/libbeat/logp" | |||
"github.com/elastic/beats/winlogbeat/sys" | |||
"github.com/elastic/beats/winlogbeat/sys/wineventlog" |
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.
For consistency, could you use the "aliased" import below for this package. It's just aliased to win
.
…event (elastic#4257) If the Level is not in the RenderingInfo section of the event, fallback on the raw level. Applies to Windows Vista and above only. https://discuss.elastic.co/t/event-fields-missing-if-renderinginfo-is-empty/84709 (cherry picked from commit c18adce)
…event (elastic#4257) If the Level is not in the RenderingInfo section of the event, fallback on the raw level. Applies to Windows Vista and above only. https://discuss.elastic.co/t/event-fields-missing-if-renderinginfo-is-empty/84709 (cherry picked from commit c18adce)
…event (elastic#4257) If the Level is not in the RenderingInfo section of the event, fallback on the raw level. Applies to Windows Vista and above only. https://discuss.elastic.co/t/event-fields-missing-if-renderinginfo-is-empty/84709 (cherry picked from commit c18adce)
…event (#4257) (#4713) If the Level is not in the RenderingInfo section of the event, fallback on the raw level. Applies to Windows Vista and above only. https://discuss.elastic.co/t/event-fields-missing-if-renderinginfo-is-empty/84709 (cherry picked from commit c18adce)
Applies to Windows Vista and above only.
https://discuss.elastic.co/t/event-fields-missing-if-renderinginfo-is-empty/84709