79279521

Date: 2024-12-13 20:42:22
Score: 1.5
Natty:
Report link

AWS Glue’s get_logger() sends logs to the stderr stream by default, which is why they appear in the Error Log Stream in CloudWatch.

If you prefer to stick with glueContext.get_logger() but ensure its logs appear in the Output Log Stream, you can redirect stderr to stdout

Add this line early in your script:

import sys sys.stderr = sys.stdout

This ensures all logs, including those from the Glue logger, go to the Output Log Stream in CloudWatch

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: swawge