Expand my Community achievements bar.

SOLVED

Custom logger not capturing logs

Avatar

Level 4

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.

1 Accepted Solution

Avatar

Correct answer by
Level 6

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.

View solution in original post

4 Replies

Avatar

Level 8

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

Avatar

Level 4

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  

Avatar

Correct answer by
Level 6

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.

Avatar

Administrator

@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