Optional
customA custom config service that can be passed to the Logger constructor to extend the default behavior.
See ConfigServiceInterface for more information.
Optional
environment?: EnvironmentThe environment in which the Lambda function is running.
Optional
jsonA custom JSON replacer function that can be passed to the Logger constructor to extend the default serialization behavior.
By default, we already extend the default serialization behavior to handle BigInt
and Error
objects, as well as remove circular references.
When a custom JSON replacer function is passed to the Logger constructor, it will be called before our custom rules for each key-value pair in the object being stringified.
This allows you to customize the serialization while still benefiting from the default behavior.
Optional
logThe level threshold for the logger to log at.
Optional
sampleThe percentage rate at which the log level is DEBUG
.
See Sampling debug logs for more information.
Optional
serviceService name to be included in log items for easier correlation.
Base constructor options for the Logger class.