Skip to main content
LinearGradient
Level 6
October 16, 2015
Respondido

Logger configuration not being picked up

  • October 16, 2015
  • 3 respostas
  • 1883 Visualizações

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?

Este tópico foi fechado para respostas.
Melhor resposta por ramyareddyg

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). 

3 Respostas

Lokesh_Shivalingaiah
Level 10
October 16, 2015

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

Lokesh_Shivalingaiah
Level 10
October 16, 2015

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

ramyareddygAdobe EmployeeResposta
Adobe Employee
October 16, 2015

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).