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.

SOLVED

Logger configuration not being picked up

Avatar

Level 7

Hi,

I have defined this logger under /apps/myapp/config.dev/org.apache.sling.commons.log.LogManager.factory.config-myapp.xml:

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" org.apache.sling.commons.log.file="logs/myapp.log" org.apache.sling.commons.log.level="trace" org.apache.sling.commons.log.names="[com.mycomp.myapp]" org.apache.sling.commons.log.pattern="\{0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}] {3} {5}"/>

However it is not getting listed in /system/console/configMgr and it is not also writing anything to the myapp.log file.

Any ideas what am I missing here?

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi,

Can you try creating a "sling:osgiConfig" node with the name org.apache.sling.commons.log.LogManager.factory.config-<customName> under the config folder(instead of xml file)? And, set the properties which are listed in your xml file to that node.

Also, make sure if you are intending to see this configuration for the run mode "dev"(since this is created under config.dev node). 

View solution in original post

3 Replies

Avatar

Correct answer by
Level 2

Hi,

Can you try creating a "sling:osgiConfig" node with the name org.apache.sling.commons.log.LogManager.factory.config-<customName> under the config folder(instead of xml file)? And, set the properties which are listed in your xml file to that node.

Also, make sure if you are intending to see this configuration for the run mode "dev"(since this is created under config.dev node). 

Avatar

Level 10

Make sure you have Factory PID 'org.apache.sling.commons.log.LogManager.factory.config' 

Avatar

Level 10

You can also refer this config 

http://<cq instance>/crx/de/index.jsp#/libs/sling/config/org.apache.sling.commons.log.LogManager.factory.config-upgrade