python logging in aws lambda

LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
logger = logging.getLogger()
logger.setLevel(level=LOG_LEVEL)


logger.info("Info log")
logger.info("Error log")

Also see