Logging Configuration Not working | Community
Skip to main content
rohitg22171791
April 26, 2017

Logging Configuration Not working

  • April 26, 2017
  • 1 reply
  • 7007 views

I have override logger configuration 'org.apache.sling.commons.log.LogManager.config' under apps through the code and it is not picked up by server.I can see in felix console the older values of the config which are present by default.I have restarted the bundle also but its not working.
Moreover, can anyone guide me how to implement rotation of logs.I have created logger config and writer config but its not working.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

daniel_henriqu1
April 26, 2017

Hi, Rohit.

I usually add only a factory configuration containing the file name, the log level and the packages/classes being logged, as you can see here:

https://github.com/daniel-lima/samples-aem-less-debug/blob/master/content/src/main/content/jcr_root/apps/samples-less-debug/config/org.apache.sling.commons.log.LogManager.factory.config-samplesLessDebug.xml

Most of the time, this is enough.
On rare occasions, I had to restart my AEM instance so the changes could take place, but that is not the regular case.

Regards,

Daniel.

rohitg22171791
April 26, 2017

Hi Daniel,

Thanks for your quick reply.I have done that before only and its working but what I need was to implement version rotation of logs and for that I was overriding ''org.apache.sling.commons.log.LogManager.config' config to give the max file size of logs and I have done that but its not working.

vjetty
April 26, 2017

Hi Rohit

Please check this configuration "org.apache.sling.commons.log.LogManager.factory.writer".

Thanks,

Vamsi