ch10.1
This commit is contained in:
@@ -6,7 +6,10 @@ import (
|
||||
)
|
||||
|
||||
func (app *application) logError(r *http.Request, err error) {
|
||||
app.logger.Print(err)
|
||||
app.logger.PrintError(err, map[string]string{
|
||||
"request_method": r.Method,
|
||||
"request_url": r.URL.String(),
|
||||
})
|
||||
}
|
||||
|
||||
func (app *application) errorResponse(w http.ResponseWriter, r *http.Request, status int, message any) {
|
||||
|
||||
Reference in New Issue
Block a user