Olha Mantuliak
Olha Mantuliak

Reputation: 93

Logs pipeline from AEM (CQ5) to the Log4j server

Is it possible to transfer the AEM (v5.6) logs to the Log4j server? Or there is some best practice for centralized AEM logging? I haven't dealt much with AEM. It seems the Apache Sling Logging services configure only the FileAppender.

Upvotes: 0

Views: 1043

Answers (2)

Dinh Tien Luyen
Dinh Tien Luyen

Reputation: 31

Upvotes: 1

Brenn
Brenn

Reputation: 1384

AEM provides the loggers out of the box as you have seen. Typically if you want centrallized log handling I would suggest mounting a super-high-speed shared volume and having all instances log there, just for performance/speed reasons.

You might want to check out this: http://adobe-consulting-services.github.io/acs-aem-commons/features/syslog-appender.html

It is AEM6 only, but you could look at the code and do it that way.

This uses logback, not log4j, but it should solve your problem.

The other option, really, is to write your own logging service and use that and configure the appender in the code. I do not see the normal XML files anywhere. I'm curious if you come across them.

Let me know if I can help further.

Upvotes: 0

Related Questions