You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(logger): add support for AWS_LAMBDA_LOG_LEVEL and POWERTOOLS_LOG_LEVEL (#1795)
* feat(logger): support advanced logging
* docs(logger): add alc info
* feat(logger): support alc
* docs: fix alc docs links
* tests(logger): add unit tests for the feature
* docs(logger): make POWERTOOLS_LOG_LEVEL default
|**Service name**| Sets the name of service of which the Lambda function is part of, that will be present across all log statements |`POWERTOOLS_SERVICE_NAME`|`service_undefined`| Any string |`serverlessAirline`|`serviceName`|
51
-
|**Logging level**| Sets how verbose Logger should be, from the most verbose to the least verbose (no logs) |`POWERTOOLS_LOG_LEVEL`|`INFO`|`DEBUG`, `INFO`, `WARN`, `ERROR`, `CRITICAL`, `SILENT`|`ERROR`|`logLevel`|
52
-
|**Sample rate**| Probability that a Lambda invocation will print all the log items regardless of the log level setting |`POWERTOOLS_LOGGER_SAMPLE_RATE`|`0`|`0.0` to `1.0`|`0.1`|`sampleRateValue`|
48
+
| Setting | Description | Environment variable | Default Value | Allowed Values | Example Value | Constructor parameter |
|**Service name**| Sets the name of service of which the Lambda function is part of, that will be present across all log statements |`POWERTOOLS_SERVICE_NAME`|`service_undefined`| Any string |`serverlessAirline`|`serviceName`|
51
+
|**Logging level**| Sets how verbose Logger should be, from the most verbose to the least verbose (no logs) |`POWERTOOLS_LOG_LEVEL`|`INFO`|`DEBUG`, `INFO`, `WARN`, `ERROR`, `CRITICAL`, `SILENT`|`ERROR`|`logLevel`|
52
+
|**Sample rate**| Probability that a Lambda invocation will print all the log items regardless of the log level setting|`POWERTOOLS_LOGGER_SAMPLE_RATE`|`0`|`0.0` to `1.0`|`0.1`|`sampleRateValue`|
53
53
54
54
See all environment variables in the [Environment variables](../index.md/#environment-variables) section.
55
55
Check API docs to learn more about [Logger constructor options](https://docs.powertools.aws.dev/lambda/typescript/latest/api/types/_aws_lambda_powertools_logger.types.ConstructorOptions.html){target="_blank"}.
0 commit comments