Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

AEM error Logger statements are printing twice

Avatar

Level 4

Hi All,

 

Logger statements are printed twice but the code executes only once. Any idea on this?

 

I verified in local Windows stand-alone and Cloudfront servers that also same issue logger statements are printing 2 times.

 

AEM: 6.5.13.0

 

Regards,

Shyam

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Since in your project, the log is pointing to error.log it actually did this->

  1. Your Project OSGI config prints the error log
  2. The default configuration `Apache Sling Logging Logger Configuration` also prints in the same file. See more-> https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/configure-loggin...
    You can find this default configuration in the OSGI config.
     

View solution in original post

4 Replies

Avatar

Community Advisor

Hello @shyamasundar-ks ,

I hope you are not watching error logs from logs/error.log

In your project make sure the log file is different,

Sady_Rifat_0-1697448987482.png

One copy of the log will be written by sling in error.log.

Avatar

Level 4

Hi @Sady_Rifat ,

 

Thanks for the reply, Yes I am referring to logs/error.log. But in my previous experience, I have never come across like this even though I used to refer logs/error.log.

 

Please can you brief me more about why 2 times printing in error.log? It will be helpful for me to understand better and  I can convey to the team about this.

 

 

 

Avatar

Correct answer by
Community Advisor

Since in your project, the log is pointing to error.log it actually did this->

  1. Your Project OSGI config prints the error log
  2. The default configuration `Apache Sling Logging Logger Configuration` also prints in the same file. See more-> https://experienceleague.adobe.com/docs/experience-manager-65/deploying/configuring/configure-loggin...
    You can find this default configuration in the OSGI config.
     

Avatar

Administrator

@shyamasundar-ks Did you find the suggestions from Sady helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni