Skip to content

Commit 73b05d2

Browse files
committed
fix(logging): Check if log level is debug or lower
1 parent e5b8a55 commit 73b05d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

watchdog/endpoint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func executeEndpoint(ep *endpoint.Endpoint, cfg *config.Config, extraLabels []st
5555
metrics.PublishMetricsForEndpoint(ep, result, extraLabels)
5656
}
5757
UpdateEndpointStatus(ep, result)
58-
if logging.Level() == slog.LevelDebug && !result.Success { // TODO#1185 Check if it is possible to get the configured level directly from slog
58+
if logging.Level() <= slog.LevelDebug && !result.Success { // TODO#1185 Check if it is possible to get the configured level directly from slog
5959
logger.Debug("Monitoring done with errors", result.GetLogAttribute(), "body", result.Body)
6060
} else {
6161
logger.Info("Monitoring done", result.GetLogAttribute())

0 commit comments

Comments
 (0)