Masked Logger
The masked logger is structured logging with a safety net: it scrubs secret-shaped values before anything is written, so a stray token in a log statement doesn’t become a plaintext leak in CloudWatch.
What it does
Section titled “What it does”- Emits structured (JSON) log lines suitable for CloudWatch Logs Insights.
- Masks values that look like secrets before serialisation.
- Respects a per-stage log level — the framework defaults handlers to
DEBUGin dev andINFOin prod.
Error helpers
Section titled “Error helpers”Pair it with serializeError(e) (safe structured error logging that never leaks a full stack to the response) and statusCodeFor(e) (maps an AtfError or generic error to an HTTP status). Both are exported from the package.
Where to go next
Section titled “Where to go next”- Middy Middleware — the logging middleware wires the logger into every request.
- The generated API reference for the exact signatures.
© 2026 Axis Tech. Powered by axis-tech.co.