Expand my Community achievements bar.

Maker in logs does not work in AEM Cloud??

Avatar

Level 2
Hi Team, I have added Marker in logs using AEM as cloud service , but it does not print at all. is it like marker not supported or any particular syntax..I need to follow
4 Replies

Avatar

Employee Advisor

Adobe’s general guidance on log levels per AEM as a Cloud Service environment are:

Local Development (AEM SDK):DEBUG
Development:DEBUG
Stage:WARN
Production:ERROR

 

Are you setting the right log level as per the environment type ?

Avatar

Employee Advisor

What do you mean with "marker in logs"?

Avatar

Community Advisor

Did you set correct log level as per environment runmode?

 

AEM Environment-Log Level

Development -DEBUG

Stage- WARN

Production- ERROR

 

Use

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyClass {
  private static final Logger log = LoggerFactory.getLogger(MyClass.class);

  public void myMethod(String name) {
    log.debug("You invoked my method: {}", name);
  }
}

Refer https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/develo...