Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 40d6f87

Browse files
committed
Don't log GC 0s at INFO (#5557)
2 parents 38e09af + 071150c commit 40d6f87

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelog.d/5557.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Logging when running GC collection on generation 0 is now at the DEBUG level, not INFO.

synapse/metrics/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,10 @@ def f(*args, **kwargs):
437437
counts = gc.get_count()
438438
for i in (2, 1, 0):
439439
if threshold[i] < counts[i]:
440-
logger.info("Collecting gc %d", i)
440+
if i == 0:
441+
logger.debug("Collecting gc %d", i)
442+
else:
443+
logger.info("Collecting gc %d", i)
441444

442445
start = time.time()
443446
unreachable = gc.collect(i)

0 commit comments

Comments
 (0)