Closed otonomoalon closed 5 years ago
Hi @otonomoalon
To clarify, what do you mean by close it with date (i.e. ecs-agent.log.2019-03-31-07)
? Do you want the agent to log all the logs to ecs-agent.log
and make each log line end with something like ecs-agent.log.2019-03-31-07
?
Thanks, Haikuo
Hi @haikuoliu hanks for your replay. yes - the agent to log all the logs to ecs-agent.log and make each log line end with something like ecs-agent.log.2019-03-31-07 - this is the desired behaviour.
However - We understood that this is not configurable but should be "hard coded" in the project? Also any best practice on tailing the active log in real time and send it to central logging server?
Thanks, Alon
@otonomoalon
Agent currently uses seelog, this is how our config looks like and this is doc for the rotation config. I hope it will help you understand our log rotation behaviors.
We understood that this is not configurable but should be "hard coded" in the project?
Yeah you are right it's not configurable now, to achieve that we may need to introduce another env var and some config for logger.
Also any best practice on tailing the active log in real time and send it to central logging server?
Sorry we don't have suggestions for it, it's all up to customers. I will mark this as a feature request.
@haikuoliu Thank you very much fo r he help. We will go with live till by fluend and forward with fluent o remote.
Best,
abwlylaasamh@gmail.com
wrt central logging for agent logs, we have some documentation around pushing agent logs to cloudwatch. closing this issue since we do not have plans to change the current default logging configuration.
Hi,
Can we change the default log rotation policy of the agent logs to log only to a unique file name ( i.e. ecs-agent.log) and close it with date (i.e. ecs-agent.log.2019-03-31-07) and not log to a log file with the date in it (i.e. ecs-agent.log.2019-03-31-07)?
Using the same "live" log file will enable tail this log by a logging service and send it to a central logging server. (Any best practice to send ecs-agent logs to central logging server)?
Thank you,