From 6dca2d65228a0cd6e12cd11e04e16ecccc1576ed Mon Sep 17 00:00:00 2001 From: Marvin Preuss Date: Fri, 14 Jan 2022 13:55:05 +0100 Subject: [PATCH] docs(README): updated example --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e10f876..6317319 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ Just a simple zerolog based request logging http middleware. It also sets a `X-R ## Usage - handler := logginghandler.Handler(http.HandlerFunc(myHandler)) + logger := log.With().Logger() + handler := logginghandler.Handler(logger)(http.HandlerFunc(myHandler)) http.Handle("/", handler) log.Fatal().Msg(http.ListenAndServe(":5000", nil).Error())