From 82fc62aed230ab9441ecb4a2f44be64a155ac9a6 Mon Sep 17 00:00:00 2001 From: Kevin Parsons Date: Thu, 3 Jan 2019 16:08:24 -0800 Subject: [PATCH] Return error from WriteEvent in Logrus hook --- pkg/etwlogrus/hook.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/etwlogrus/hook.go b/pkg/etwlogrus/hook.go index 3a24282..28d079f 100644 --- a/pkg/etwlogrus/hook.go +++ b/pkg/etwlogrus/hook.go @@ -64,12 +64,10 @@ func (h *Hook) Fire(e *logrus.Entry) error { // We could try to map Logrus levels to ETW levels, but we would lose some // fidelity as there are fewer ETW levels. So instead we use the level // directly. - h.provider.WriteEvent( + return h.provider.WriteEvent( "LogrusEntry", etw.WithEventOpts(etw.WithLevel(level)), fields) - - return nil } // Close cleans up the hook and closes the ETW provider.