AEM error Logger statements are printing twice | Community
Skip to main content
Level 3
October 16, 2023
Solved

AEM error Logger statements are printing twice

  • October 16, 2023
  • 2 replies
  • 1083 views

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

 

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 Sady_Rifat

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-logging.html?lang=en.
    You can find this default configuration in the OSGI config.
     

2 replies

Sady_Rifat
Community Advisor
Community Advisor
October 16, 2023

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,

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

Level 3
October 16, 2023

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.

 

 

 

Sady_Rifat
Community Advisor
Sady_RifatCommunity AdvisorAccepted solution
Community Advisor
October 16, 2023

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-logging.html?lang=en.
    You can find this default configuration in the OSGI config.
     
kautuk_sahni
Community Manager
Community Manager
October 16, 2023

@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