Skip to content

Commit

Permalink
Add additional check for "msg" for skip log (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
mallyx3 authored May 24, 2023
1 parent 68485c3 commit b37c8ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion enricher/eks/eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var _ enricher.IEnricher = (*Enricher)(nil)

func (e Enricher) EnrichRecord(r map[interface{}]interface{}, t time.Time) map[interface{}]interface{} {
// Drop log if "log" field is empty
if r[mappings.LOG_FIELD_NAME] == nil {
if r[mappings.LOG_FIELD_NAME] == nil && r[mappings.MSG_FIELD_NAME] == nil {
return nil
}

Expand Down
1 change: 1 addition & 0 deletions enricher/mappings/mappings.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const (

const (
LOG_FIELD_NAME = "log"
MSG_FIELD_NAME = "message"
)

const (
Expand Down

0 comments on commit b37c8ba

Please sign in to comment.