Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

CQ 5.6.1 & Logback

om_vineet
Level 2
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
Sham_HC
Correct answer by
Level 10
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
Sham_HC
Correct answer by
Level 10
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

om_vineet
Level 2
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?