Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

Two or more custom logs - AEM

Avatar

Level 9

Hi,

Currently, we have a custom log name (org.apache.sling.commons.log.LogManager.factory.config-customLog1): custom-log1.log and logging all the details for: com.gemotrixx.aem

I have created another logger (org.apache.sling.commons.log.LogManager.factory.config-customLog2) name is: custom-log2.log and logging com.geometrixx.aem.core.newfunctionality details.

When I run the new functionality, it should log details to both logs but its logging into only the second log.

I am getting the logger : Logger log = LoggerFactory.getLogger(getClass());

Can we get a specific logger instance to log the details as mentioned in below post?

1478125_pastedImage_7.png

Can you someone help me to understand this?

Thanks

21 Replies

Avatar

Level 10

With Joergs response - i tested this too setting org.apache.sling.commons.log.additiv.

LogOutput.png

You can get AEM to log to the default log file (project-logsample) and a custom one (logsample-model.log).

However - still not seeing a way to write out a message to 2 custom log files bound to the same Java package. We will make that note in the article.