Développer ma barre des réalisations de la Communauté.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
RÉSOLU

Check logs for specific java class in AEMaaCS

Avatar

Level 3

Hello guys ,

 

As per this docs - https://experienceleague.adobe.com/en/docs/experience-manager-learn/cloud-service/debugging/debuggin...  , custom log file is not supported in  AEM aa CS .

I have tried writing custom logs to error.log in org.apache.sling.commons.log.LogManager.factory.config~test.cfg.json using below configuration . But I am still not getting custom log statements in aemerror.log file ( from developer console ) . 

 

 

 

{

"org.apache.sling.commons.log.names": [

"com.brandnew.core.models.TestClass"

],

"org.apache.sling.commons.log.level": "INFO",

"org.apache.sling.commons.log.file": "logs/error.log",

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

}

 

Could you guys please suggest any other solution or point out any mistake in above steps?

 

 

1 solution acceptée

Avatar

Réponse correcte par
Community Advisor and Adobe Champion

Hi @newbie34,

the below configuration without specifying a log file works for me on AEMaaCS:

{
  "org.apache.sling.commons.log.level": "$[env:LOG_LEVEL_CUSTOM;default=error]",
  "org.apache.sling.commons.log.names": [
    "com.my-project.cms"
  ]
}

 

Hope this helps,

Daniel

Voir la solution dans l'envoi d'origine

4 Replies

Avatar

Réponse correcte par
Community Advisor and Adobe Champion

Hi @newbie34,

the below configuration without specifying a log file works for me on AEMaaCS:

{
  "org.apache.sling.commons.log.level": "$[env:LOG_LEVEL_CUSTOM;default=error]",
  "org.apache.sling.commons.log.names": [
    "com.my-project.cms"
  ]
}

 

Hope this helps,

Daniel

Avatar

Level 3

Hi @daniel-strmecki , 

Thanks for replying . 

So are you able to see log statements for specified class in "aemerror" file from developer console?

 

Avatar

Community Advisor and Adobe Champion

Hi @newbie34,

yes. You should see the log statement also without any custom config, but this enables us to lower the log level to INFO for our specific packages.

 

Good luck,

Daniel

Avatar

Level 3

Thanks @daniel-strmecki , worked for me too .