Skip to content

Commit

Permalink
logger: add ID to logger context
Browse files Browse the repository at this point in the history
  • Loading branch information
mmat11 committed Feb 9, 2024
1 parent 21cf489 commit df7dc6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion auditbeat/module/file_integrity/metricset.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
if err := base.Module().UnpackConfig(&config); err != nil {
return nil, err
}
logger := base.Logger()

logger := logp.NewLogger(moduleName)
if base.ID() != "" {
logger = logger.With("id", base.ID())
}

r, err := NewEventReader(config, logger)
if err != nil {
Expand Down

0 comments on commit df7dc6f

Please sign in to comment.