aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
souenzzo 2020-01-27T17:27:18.002Z

Hello I'm curentilty using logback for logging, what is the easiest path to get my logging into CloudWatch? I see that there is many paths: log to file > file to cloudwatch, logback provider, slf4j provider ....

viesti 2020-01-27T17:32:01.002800Z

if you run in Docker, there's awslogs driver (comes with Docker) which can ship logs to Cloudwatch

viesti 2020-01-27T17:32:41.003300Z

if you run in EC2, there's Cloudwatch logs agent, which can ship logs to Cloudwatch: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html

viesti 2020-01-27T17:33:44.004100Z

agent is good in that if the app goes wonky, then logs will still probably be shipped

viesti 2020-01-27T17:34:40.004500Z

but if in docker land, I'd go for awslogs agent

ghadi 2020-01-27T17:54:53.005Z

I use Fargate, and send my logs to stdout

jsyrjala 2020-01-27T17:55:47.005600Z

There are logback appenders that send logs to CloudWatch Logs, for example: https://github.com/dibog/cloudwatch-logback-appender

jsyrjala 2020-01-27T18:02:26.006Z

You can configure it via logback.xml .

jsyrjala 2020-01-27T18:03:02.006200Z

This can be used if you have normal java process running on EC2 instance.

viesti 2020-01-27T19:37:51.006500Z

this is the case handled by awslogs driver (from user point of view, logging happens to stdout)

ghadi 2020-01-27T19:48:29.006900Z

those appenders tend to pull in a lot of dependencies