wrap long lines with many logging parameters to multiple lines

for improved readability
This commit is contained in:
Mechiel Lukkien
2023-12-05 16:06:50 +01:00
parent 5b20cba50a
commit fcaa504878
31 changed files with 327 additions and 68 deletions

View File

@ -57,5 +57,9 @@ func HTTPClientObserve(ctx context.Context, log mlog.Log, pkg, method string, st
result = "error"
}
metricHTTPClient.WithLabelValues(pkg, method, result, fmt.Sprintf("%d", statusCode)).Observe(float64(time.Since(start)) / float64(time.Second))
log.Debugx("httpclient result", err, slog.String("pkg", pkg), slog.String("method", method), slog.Int("code", statusCode), slog.Duration("duration", time.Since(start)))
log.Debugx("httpclient result", err,
slog.String("pkg", pkg),
slog.String("method", method),
slog.Int("code", statusCode),
slog.Duration("duration", time.Since(start)))
}