diff --git a/CHANGELOG.md b/CHANGELOG.md index e4999c2bb22..b63ff92f698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ ### 🧰 Bug fixes 🧰 +- Fix Windows Event Logs ignoring user-specified logging options (#5298) + ## v0.50.0 Beta ### 🛑 Breaking changes 🛑 diff --git a/service/collector_windows.go b/service/collector_windows.go index a20493694b4..1e060d64a23 100644 --- a/service/collector_windows.go +++ b/service/collector_windows.go @@ -152,8 +152,8 @@ func newWithWindowsEventLogCore(set CollectorSettings, elog *eventlog.Log) (*Col } } set.LoggingOptions = append( - set.LoggingOptions, - zap.WrapCore(withWindowsCore(elog)), + []zap.Option{zap.WrapCore(withWindowsCore(elog))}, + set.LoggingOptions..., ) return New(set) }