diff options
Diffstat (limited to '')
-rw-r--r-- | cmd/web/helpers.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/web/helpers.go b/cmd/web/helpers.go index fc9b8f8..882f506 100644 --- a/cmd/web/helpers.go +++ b/cmd/web/helpers.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "log" "net/http" "runtime/debug" ) @@ -14,8 +13,8 @@ func (app *application) serverError(w http.ResponseWriter, r *http.Request, err trace = string(debug.Stack()) ) - app.logger.Error(err.Error(), "method", method, "uri", uri, "trace", trace) - log.Printf("Crash! %s %s %s", method, uri, trace) + app.logger.Printf(err.Error(), method, uri, trace) + app.logger.Printf("Crash! %s %s %s", method, uri, trace) http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) } |