From ac6efd8f69cec8b916082cf7e45d0d515030e03e Mon Sep 17 00:00:00 2001 From: Carl Jackson Date: Wed, 29 Oct 2014 22:32:29 -0700 Subject: [PATCH] Add a note about outgrowing Logger This is a common enough question that it's worth calling out explicitly. --- web/middleware/logger.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/middleware/logger.go b/web/middleware/logger.go index fce822e..e0fb9aa 100644 --- a/web/middleware/logger.go +++ b/web/middleware/logger.go @@ -16,6 +16,13 @@ import ( // print in color, otherwise it will print in black and white. // // Logger prints a request ID if one is provided. +// +// Logger has been designed explicitly to be Good Enough for use in small +// applications and for people just getting started with Goji. It is expected +// that applications will eventually outgrow this middleware and replace it with +// a custom request logger, such as one that produces machine-parseable output, +// outputs logs to a different service (e.g., syslog), or formats lines like +// those printed elsewhere in the application. func Logger(c *web.C, h http.Handler) http.Handler { fn := func(w http.ResponseWriter, r *http.Request) { reqID := GetReqID(*c)