mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 08:36:55 +03:00
lib/httpserver: log the caller of httpserver.Errorf
Previously log message contained `httpserver.Errorf`, not it contains the caller of `httpserver.Errorf`, which is more useful.
This commit is contained in:
@@ -418,7 +418,7 @@ var (
|
||||
// Errorf writes formatted error message to w and to logger.
|
||||
func Errorf(w http.ResponseWriter, format string, args ...interface{}) {
|
||||
errStr := fmt.Sprintf(format, args...)
|
||||
logger.Errorf("%s", errStr)
|
||||
logger.ErrorfSkipframes(1, "%s", errStr)
|
||||
|
||||
// Extract statusCode from args
|
||||
statusCode := http.StatusBadRequest
|
||||
|
||||
Reference in New Issue
Block a user