Tailing logs on AEM as Cloud Service
Published
error.log
. Logs written to custom files, like saml.log
, are inaccessible. To write logs to error.log
, use the Sling LogManager
OSGi config.org.apache.sling.commons.log.LogManager.factory.config~aem-demo.cfg.json
{
"org.apache.sling.commons.log.level": "DEBUG",
"org.apache.sling.commons.log.file": "logs/error.log"
}
aemerror
, aemaccess
, and aemrequest
logs, while AEM Dispatcher provides httpdaccess
, httperror
, and aemdispatcher
log files. The recommended log levels for custom loggers per environment type: DEBUG (Development), WARN (Stage), ERROR (Production).- Install Adobe I/O CLI:
npm install -g @adobe/aio-cli
- Install Cloud Manager Plugin:
aio plugins:install @adobe/aio-cli-plugin-cloudmanager
- Login to Adobe IMS:
aio login
- Org List:
aio cloudmanager:org:list
- Select Org:
aio cloudmanager:org:select [ORGID]
- List of Programs:
aio cloudmanager:list-programs
- Select Default Program:
aio config:set cloudmanager_programid [PROGRAMID]
- List of Environments:
aio cloudmanager:list-environments
- List Available Log Options:
aio cloudmanager:environment:list-available-log-options [ENVIRONMENTID]
- Download Logs:
aio cloudmanager:environment:download-logs [ENVIRONMENTID] [SERVICE] [NAME] [DAYS]
- Tail Log:
aio cloudmanager:environment:tail-log [ENVIRONMENTID] [SERVICE] [NAME]