github.com/secureworks/logger/middleware (go): Package middleware has HTTP server middleware that provides access to a shared logger and simplifies writing canonical log lines with a shared entry per request. It also automates basic request parameter logging.  NewHTTPServer binds a logger to an HTTP server so that it will be present in every request context:  NewHTTPRequestMiddleware injects an entry into the context of the the request that it writes after the succeeding handlers process it. This entry has certain aspects of the request logged by default, but can be configured to include more. Subsequent handlers can also extract the entry and update it to allow for canonical log line logging.
Keywords: golang|golang-library|logger|logging