* Emit a single JSON line to stdout. CloudWatch ingests each line as a * structured event; Logs Insights queries can `filter event="..."` and * project specific fields. We write to stdout (not stderr) because * Lambda's default destination for both is the same log group, and * Logs Insights' INF
(payload: Record<string, unknown>)
| 169 | * field, not the stream. |
| 170 | */ |
| 171 | function logEvent(payload: Record<string, unknown>): void { |
| 172 | console.log(JSON.stringify(payload)); |
| 173 | } |
| 174 | |
| 175 | /** |
| 176 | * Compact, non-PII summary of a Lambda event for logging. The full |