From 9230753886a98ffefae111d257d08fd7d115c7fa Mon Sep 17 00:00:00 2001 From: Braydon Kains <93549768+braydonk@users.noreply.github.com> Date: Thu, 5 May 2022 12:48:01 -0400 Subject: [PATCH] service: prepend the windowsEventLogCore (#5298) * service: prepend the windowsEventLogCore * CHANGELOG: add bugfix entry --- CHANGELOG.md | 2 ++ service/collector_windows.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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) }