Is there a way to exclude a package/class from logging in a sling:OsgiConfig file? | Community
Skip to main content
LinearGradient
Level 6
October 16, 2015
Solved

Is there a way to exclude a package/class from logging in a sling:OsgiConfig file?

  • October 16, 2015
  • 1 reply
  • 1002 views

Is there a way to add com.mycomp.myapp to the log.names but exclude com.mycomp.myapp.NoisyClass?

Is it allowed to use com.mycomp.myapp.NoisyClass:OFF in the log.names?

<?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/ss.log" org.apache.sling.commons.log.level="trace" org.apache.sling.commons.log.names="[com.mycomp.myapp,com.mycomp.myapp.NoisyClass:OFF]" org.apache.sling.commons.log.pattern="\{0,date,dd.MM.yyyy HH:mm:ss.SSS} *{4}* [{2}] {3} {5}"/>
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

This subject is discussed here:

AEM Logging

Sling Logging

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

This subject is discussed here:

AEM Logging

Sling Logging