AWS Glue jobs log output and errors to two different CloudWatch logs, /aws-glue/jobs/error
and /aws-glue/jobs/output
by default. When I include p
Try to use built-in python logger from logging
module, by default it writes messages to standard output stream.
import logging
MSG_FORMAT = '%(asctime)s %(levelname)s %(name)s: %(message)s'
DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'
logging.basicConfig(format=MSG_FORMAT, datefmt=DATETIME_FORMAT)
logger = logging.getLogger()
logger.setLevel(logging.INFO)
...
logger.info("Test log message")