0

I've rails app running with docker installed EC2 instance. I'm struggling with piping my docker container logs(STDOUT) to AWS cloudwatch console.

I've already tried by installing awslogs agent on ec2 instance as described below by following link. https://blog.shikisoft.com/store-monitor-rails-logs-on-amazon-cloudwatch/#:~:text=Start%20Amazon%20CloudWatch%20Logs%20agent%20to%20stream%20the%20logs&text=After%20a%20while%2C%20you%20will,%3E%20MyAppGroup%20%2D%3E%20instance_id%E2%80%9D.

Problem is that how can i got file path of docker container's log file in production environment.

[my_app_stream]
log_group_name = MyAppGroup
log_stream_name = {instance_id}
datetime_format = %Y-%m-%dT%H:%M:%S.%f
file = /var/www/my-app/current/log/production.log*

Stucked at line file = /var/www/my-app/current/log/production.log*

Can anyone please guide me, how can i achieve this or using other way? Any help would be appreciated.

nidhi_007
  • 21
  • 12

1 Answers1

0

Finally found the solution, had attached awslogs as logging driver when deploying docker container.

nidhi_007
  • 21
  • 12