Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log4J2 CloudWatch Appender

I'm looking for an official AWS CloudWatch Appender for Log4J2. I've search all over and didn't find any.

Anybody there using CloudWatch in Java Apps with Log4J2?

like image 796
Gonzalo Gallotti Avatar asked Dec 13 '17 12:12

Gonzalo Gallotti


1 Answers

I've been reading that the best approach to integrate with AWS Cloud Watch logs is using the Cloud Watch Log Agent.

It seems that having an independent agent will be much more reliable that the Application logging directly to Cloud Watch.

[Update] Why it may be more reliable?

  • If CloudWatch or the WebServer connection is down, the Appender may miss the Log Event. A write to disk would never be miss.

  • Nothing is faster than write to a stream file on local disk. When high log volume, sending data through a TCP connection could have performance impact or bottolnecks in the Application.

like image 56
Gonzalo Gallotti Avatar answered Oct 19 '22 01:10

Gonzalo Gallotti