From 402c1c9f9f2100a1df3f1b0e0730fe09dd138783 Mon Sep 17 00:00:00 2001 From: Martin Strobel Date: Thu, 3 May 2018 16:16:48 -0700 Subject: [PATCH] Adding Logging back in to otherwise isolated context. --- sdk/eventgrid/context.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/eventgrid/context.go b/sdk/eventgrid/context.go index 65b9b14..4e4766a 100644 --- a/sdk/eventgrid/context.go +++ b/sdk/eventgrid/context.go @@ -59,6 +59,9 @@ func (c *Context) ResponseHasFailure() bool { func (c *Context) Error(status int, err error) error { c.resp.WriteHeader(status) + if logger := c.Logger(); logger != nil { + logger.Error(err) + } return errors.WithStack(err) }