I'm trying to run a script in AWS lambda and I want to output info level logs to the console after the script runs. I've tried looking for help from This post on using logs in lambda buy haven't had any success. I think AWS Cloudwatch is overriding my configuration shown bellow.
import logging
# log configuration
logging.basicConfig(
format='%(levelname)s: %(message)s',
level=logging.INFO,
encoding="utf-8"
)
I want to set the logging level to logging.info. How can I do this? The runtime is python 3.9