ECS(Scheduled Taks) -> CloudWatch - Missing logs.

0

Hi,
I'm facing an issue with randomly disappearing logs on cloudwatch.

I have scheduled tasks on ECS which run container with defined inside entrypoint which is responsible for running task using this same container but with other entrypoint.

During first task(first entrypoint) - logging works correctly but when this task trigger another tasks(same container but other entrypoint) logs in cloudwatch appears randomly.
This happens even when I run that tasks by hand.
First run may fail with logs but the second one 5 minutes later works. With exactly the same settings.
I'm 100% sure that functionality inside container works(I checked).

I have no idea what kind of further investigation may I do.
Any suggestions?

EDIT:
I implemented boto3 for logs next to python logger.
Events via boto3 are handled correctly so it's a kind of workaround but it still not resolve an issue.

SOLUTION-WORKAROUND:
Use https://github.com/kislyuk/watchtower handler for python loggers

Edited by: karoljago on Apr 30, 2019 12:05 AM

질문됨 5년 전399회 조회
3개 답변
0

Hey there! I'm noticing the same issue... I posted on it and it hasn't been replied to yet.

naji247
답변함 5년 전
0

Figured out a way to always catch logs from python code

답변함 5년 전
0

How did you do it?

naji247
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인