Custom logger not capturing logs | Community
Skip to main content
Prashardan
Level 4
October 24, 2024
Solved

Custom logger not capturing logs

  • October 24, 2024
  • 4 replies
  • 1057 views

Hi Team

 

I have created a custom log at system/console/slinglog with log level info and additive false I have selected correct java file from core. I can see log file is created however logs are capturing when I trigger any page which uses this java file.

 

I can configuration is also created at /apps/system/config/org.apache.sling.commons.log.LogManager.factory.config......  but not sure why logs are not capturing even though I have logger statements.

 

Please help me.

 

Thanks in advance.

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

Hi @prashardan 


No sure what your config looks like. Maybe you can share it so that you can get better help.

But please do consider to check the additive property, to not have an "e" character at the end. I believe there is typo in the expected property so we just need to go along with it for now. So correctly should be:

"org.apache.sling.commons.log.additiv": "false"

https://sling.apache.org/documentation/development/logging.html
I just thought  to mention it to you, not knowing if you are aware.

4 replies

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 24, 2024

Hi @prashardan,

maybe you can share your log configuration? Did you try restarting AEM, this sometimes helps. Have you checked that your bundle/component is active in the console?

 

Good luck,

Daniel

PRATHYUSHA_VP
Community Advisor
Community Advisor
October 25, 2024

Hi @prashardan 

 

Can you re-check the default LOG level you have updated for the custom LOG file that you've created (try changing from INFO to DEBUG) and the logger statements in java file and change accordingly ? 

 

Hope this helps !

 

Prathyusha  

Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
October 25, 2024

Hi @prashardan 


No sure what your config looks like. Maybe you can share it so that you can get better help.

But please do consider to check the additive property, to not have an "e" character at the end. I believe there is typo in the expected property so we just need to go along with it for now. So correctly should be:

"org.apache.sling.commons.log.additiv": "false"

https://sling.apache.org/documentation/development/logging.html
I just thought  to mention it to you, not knowing if you are aware.

kautuk_sahni
Community Manager
Community Manager
November 5, 2024

@prashardan Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni