Skip to content

Commit c96c0b3

Browse files
committed
probe logs
1 parent b2d312f commit c96c0b3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lambdas/id_sync/src/record_processor.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@
1414
def process_record(event_record: Dict[str, Any]) -> Dict[str, Any]:
1515

1616
logger.info("process_record. Processing record: %s", event_record)
17+
# Probe logger configuration to help debug missing logs in CloudWatch
18+
try:
19+
import logging as _logging
20+
logger.info(
21+
"probe: logger id=%s module=%s level=%s handlers=%d",
22+
hex(id(logger)), getattr(logger, "__module__", None),
23+
_logging.getLevelName(logger.getEffectiveLevel()), len(logger.handlers),
24+
)
25+
except Exception:
26+
# Keep probe non-fatal in production
27+
pass
1728
body_text = event_record.get('body', '')
1829

1930
# convert body to json (try JSON first, then fall back to Python literal)

0 commit comments

Comments
 (0)