Add middleware to include the request ID in all logs.

This commit is contained in:
mikestefanello 2021-12-08 21:55:30 -05:00
parent 4096691df0
commit 26e456eae3
5 changed files with 28 additions and 10 deletions

View file

@ -99,12 +99,11 @@ func (t *Controller) cachePage(c echo.Context, p Page, html *bytes.Buffer) {
}
err := marshaler.New(t.Container.Cache).Set(c.Request().Context(), key, cp, opts)
if err != nil {
c.Logger().Errorf("failed to cache page: %s", key)
c.Logger().Error(err)
c.Logger().Errorf("failed to cache page: %v", err)
return
}
c.Logger().Infof("cached page for: %s", key)
c.Logger().Infof("cached page")
}
func (t *Controller) parsePageTemplates(p Page) error {