We already set the POWERTOOLS_SERVICE_NAME based on the functionName, however we should also allow a global POWERTOOLS_LOG_LEVEL level to be set for all functions.
It should:
- Set the
POWERTOOLS_LOG_LEVEL environment variable to INFO by default.
- If the environment variable is set for a particular Function, let that override the set value or default.
- The blueprint props should be typed to only allow one of the following (based on documentation):
DEBUG, INFO, WARN, ERROR, CRITICAL, SILENT.
We already set the
POWERTOOLS_SERVICE_NAMEbased on thefunctionName, however we should also allow a globalPOWERTOOLS_LOG_LEVELlevel to be set for all functions.It should:
POWERTOOLS_LOG_LEVELenvironment variable toINFOby default.DEBUG,INFO,WARN,ERROR,CRITICAL,SILENT.