Skip to content

Commit bcaacd6

Browse files
committed
Log health checks other than OK as a warning
1 parent 3738e89 commit bcaacd6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

bbblb/services/health.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ async def run(self):
3434
msg = f"Internal error in health check: {exc}"
3535
name = obj.__class__.__qualname__
3636
self.checks[name] = (status, msg)
37-
LOG.debug(f"[{name}] {status.name} {msg}")
37+
if status == Health.OK:
38+
LOG.debug(f"[{name}] {status.name} {msg}")
39+
else:
40+
LOG.warning(f"[{name}] {status.name} {msg}")
3841
except asyncio.CancelledError:
3942
self.checks.clear()
4043
raise

0 commit comments

Comments
 (0)