April 1, 2020
Estimated Post Reading Time ~ < 1 Min

How to Debug a Particular Java Class in CQ

It sometimes becomes necessary to make a particular package or class spit out DEBUG level log entries in order to troubleshoot problems.

1) From the error.log, determine the class that is causing trouble e.g. CQ LinkChecker (com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask)

2) Add a DEBUG logger configuration for that class.

In the OSGi configuration console at /system/console/configMgr, search for “Apache Sling Logger Configuration” and click the plus sign to its right. The class name should be in the field labeled “Logger”. See the example below.tumblr_inline_pb1kcxkTiA1r414c2_500
3) Click ‘Save".

4) Checks the CQ /logs folder for the log.

NOTE: To get a system-wide view of all of these many logger configurations, navigate to /system/console/slinglog
aem4beginner.blogspot


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.

Ad Blocker Detected :(

Please consider supporting us by disabling your ad blocker.

Please Disable your adblocker and Refresh the page to view the site content.