Expand my Community achievements bar.

SOLVED

CQ 5.6.1 & Logback

Avatar

Level 2

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? 

1 Accepted Solution

Avatar

Correct answer by
Level 10

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/resour...

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

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/resour...

Avatar

Level 2

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?