Skip to content

Commit

Permalink
gateway: degrade error in gateway to log to reduce noise
Browse files Browse the repository at this point in the history
It logs all errors including expired IPNS keys and other non important
errors.

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
  • Loading branch information
Kubuxu committed Jul 15, 2016
1 parent 6912f47 commit c1f7428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ func webError(w http.ResponseWriter, message string, err error, defaultCode int)

func webErrorWithCode(w http.ResponseWriter, message string, err error, code int) {
w.WriteHeader(code)
log.Errorf("%s: %s", message, err) // TODO(cryptix): log errors until we have a better way to expose these (counter metrics maybe)
log.Infof("%s: %s", message, err) // TODO(cryptix): log until we have a better way to expose these (counter metrics maybe)
fmt.Fprintf(w, "%s: %s", message, err)
}

Expand Down

0 comments on commit c1f7428

Please sign in to comment.