Custom AEM logs not appearing in Cloud Manager

Custom log statements do not appear in Cloud Manager when your logger is configured to write to a custom log file, when the OSGi factory configuration is misnamed, or when the log level is too restrictive. AEM as a Cloud Service does not support custom log files and exposes only standard streams such as aemerror, so output sent elsewhere is ignored. Correcting the logger file path, the configuration filename, and the log level restores the expected entries. To fix the issue, point the logger at logs/error.log and apply valid configuration values.

Description description

Environment

  • Adobe Experience Manager as a Cloud Service
  • AEM Managed Services
  • AEM Assets Essentials

Issue/Symptoms

  • Custom log files such asmy-custom.log or saml.log, do not appear in Cloud Manager.
  • Log statements do not appear in aemerrordespite successful execution.
  • Log tail commands fail when accessing custom log files.
  • INFO or DEBUG log entries do not appear due to a restrictive log level.

Cause

AEM as a Cloud Service enforces a centralized logging model that writes all Java log output to logs/error.log, so it ignores any configuration that defines custom log file paths. Incorrect OSGi logger configuration, invalid file naming conventions, or restrictive log level settings also prevent log statements from appearing in the aemerror stream.

Resolution resolution

Follow these steps to resolve the issue

  1. Review the OSGi logger configurations in your code repository and identify any configuration where org.apache.sling.commons.log.file specifies a custom log file path instead of logs/error.log.
  2. Update the logger configuration to use the supported file by setting org.apache.sling.commons.log.file it to logs/error.log and verify all related properties use valid values.
  3. Validate that the configuration file name follows the required format org.apache.sling.commons.log.LogManager.factory.config-.cfg.json and remove invalid characters such as tilde ( ).
  4. Check the log level configuration and set it to a valid lowercase value such as debug, info, warn, or error, ensuring it does not restrict expected output.
  5. Inspect all logger configurations and remove duplicate or conflicting definitions for the same package.
  6. Deploy the updated configuration through the pipeline and verify that log entries appear in the aemerrorlog stream in Cloud Manager.
recommendation-more-help
experience-cloud-kcs-help-kbarticles