0

I am using MWAA that executes Python task using ECS. I tried to add logs with logger.info, but can't find them in CloudWatch. I am able to see logger.warning logs.

I tried to add:

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)

to my python task and in my Docker file. (Added as a file with other functions by ENTRYPOINT.)

All my logs in MWAA are set to info.

Oscar Schafer
  • 1,215
  • 1
  • 12
  • 25
  • This doesn't sound like an AWS issue at all. If you run the same Docker image locally, do you see those logs being output to the Docker console? Get the logs working locally and they will also work when you deploy the docker image to AWS. – Mark B Aug 24 '23 at 12:00
  • Yes, you are right, it works now, I use: logging.basicConfig() logging.getLogger().setLevel(logging.INFO) Thanks! – יבגני לוי Aug 29 '23 at 14:16

1 Answers1

0

It seems that your problem is not on ECS but on the log level, as python logging level is by default warning, what you are trying to do is get the info logs to be shown, try looking this question.

Zorrero
  • 181
  • 5