It can be very useful to set the log level of Tridion’s content service to Debug every once in a while. I admit I always do that on my own development environments – you never know when you will need it. Of course, I would not recommend it for production environments but that’s another story.
One thing is really annoying though: every 10 seconds, the content service makes a call to the discovery service (for whatever reason, perhaps to check the validadity of the tokens or something). And this leads to so much logging that you always have to wade through endless lines of useless logging before you get to the interesting bits.
Today, I thought I’d finally figure out how to get rid of this. And it turned out to be very easy. Just open the logback.xml in the config folder of the content service, and look for this line:
<logger name="com.sdl" level="DEBUG"/>
Insert the following lines underneath:
<!-- disable verbose logging related to the discovery service monitor process --> <logger name="com.sdl.odata" level="ERROR"/> <logger name="com.sdl.delivery.configuration" level="ERROR"/> <logger name="com.sdl.web.client" level="ERROR"/> <logger name="com.tridion.configuration.VariableResolverUtil" level="ERROR"/>
Restart the content service (or wait a minute if you have ‘scan=”true”‘ at the start of the file) and this useless logging will be gone.
On my environment, the only logging I still get if the content service is not called, is about the revalidation of tokens (which normally happens once every 5 minutes). You can get rid of that as well if you want, by adding one more line:
<logger name="com.sdl.web.oauth.common" level="ERROR"/>