CQ 5.6.1 & Logback | Community
Skip to main content
Level 2
October 16, 2015
Solved

CQ 5.6.1 & Logback

  • October 16, 2015
  • 2 replies
  • 2165 views

Has anybody tried configuring CQ5.6.1 with Logback which provides obvious benefits over Log4J. SL4J provides inbuilt support for logback and CQ5.6.1 logging is based on SL4J, so I guess it should be achievable.

 

Also there are certain use cases where-in we need to provide unique request ID to all the loggers which are serving that request. To achieve this, I was thinking over to use MDC in a request filter and then changing default log format to include this in every log statement. At the same time I don't want to change any log statement which I have in all the existing java classes but want to do it by updating the default log format. Did anybody do something like this? If yes, please let me know how? 

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 Sham_HC

It is in pipeline & you can see from [1].  

For now you need to custom build by adding the jars, change the pom.xml and also add logback.xml For an reference take a look at OSGI application example for using logback at [2].

[1]     https://issues.apache.org/jira/browse/SLING-2024

[2]     https://github.com/cqsupport/webinar-optimizingrequestperformance/blob/master/bundle/src/main/resources/logback.xml

2 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

It is in pipeline & you can see from [1].  

For now you need to custom build by adding the jars, change the pom.xml and also add logback.xml For an reference take a look at OSGI application example for using logback at [2].

[1]     https://issues.apache.org/jira/browse/SLING-2024

[2]     https://github.com/cqsupport/webinar-optimizingrequestperformance/blob/master/bundle/src/main/resources/logback.xml

om_vineetAuthor
Level 2
October 16, 2015

Thanks Sham.

 

I will give this a try. Do we know by when can we expect these? Also do we have both in pipeline i.e. logback as well as MDC?