AEM Logs in AEM as a Cloud Service: Access, Loggers and Log Forwarding
The logs AEM as a Cloud Service writes, how to download or tail them, how to add a logger, and how logForwarding.yaml ships them to Splunk, Datadog or S3.
Written in November 2026 for AEM as a Cloud Service, with a short section on AEM 6.5. Checked against Adobe's logging, log management, log forwarding and config pipeline documentation, the Cloud Manager CLI plugin and the Apache Sling logging docs.
On this page
AEM as a Cloud Service has no log folder you can open on a server. Each environment writes its AEM, Apache, Dispatcher and CDN logs to Adobe's infrastructure, and you reach them in three ways: download a day's file in Cloud Manager, stream it with the Adobe I/O CLI, or forward everything to your own Splunk, Datadog, Elasticsearch, S3 or HTTPS endpoint with a logForwarding.yaml file. Cloud Manager keeps seven days of logs. Anything you need to keep longer, or search across environments, has to be forwarded.
Which logs does AEM as a Cloud Service write?
Adobe's logging reference describes seven logs. The second column is the name Cloud Manager and the CLI expect when you ask for one.
| Log | Name in Cloud Manager | Tier | What it records |
|---|---|---|---|
| AEM Java log | aemerror | author, publish | Messages from every bundle, including your own code. File error.log in the local SDK. |
| AEM HTTP request log | aemrequest | author, publish | Each request and its response as a numbered pair: method and URL going in, status, content type and time coming out. |
| AEM HTTP access log | aemaccess | author, publish | One line per request with the pod, the user and the timestamp. |
| Apache httpd access log | httpdaccess | publish | Requests as the web server in front of AEM saw them. |
| Apache httpd error log | httpderror | publish | Apache errors, including mod_rewrite output. |
| Dispatcher log | aemdispatcher | publish | URL, status, response time, farm and cache action (miss, none) per request. |
| CDN log | CDN row of the publish service | publish | JSON, one object per request, with fields such as cli_ip, url, status, cache and ttfb. |
Two limits shape how you log. Your code's messages only reach you through the AEM Java log: Cloud Service doesn't support custom log files, so a logger pointed at logs/myapp.log writes somewhere you can't download. And the Apache, Dispatcher and CDN logs exist for publish only. If a page on the live site returns a 404, start with the Dispatcher log, because a request blocked by a Dispatcher filter rule never reaches AEM and leaves nothing in aemerror.
How do you download AEM logs in Cloud Manager?
- Sign in to Cloud Manager, pick the organization and open the program.
- On the Environments card, open the ellipsis menu of the environment and choose Download Logs.
- Pick the service in the drop-down: author, publish or dispatcher.
- Click the download icon next to the log and day you want.
Each file covers one day. The CDN log lives in the same dialog: choose the publish service and use the CDN row. Today's CDN file ends in .log, earlier days arrive as .log.gz. When an environment has additional publish regions, each region's logs are downloaded separately.
How do you tail AEM logs from the command line?
The Cloud Manager plugin for the Adobe I/O CLI streams a log while you reproduce a problem. It needs a one-time setup:
npm install -g @adobe/aio-cli
aio plugins:install @adobe/aio-cli-plugin-cloudmanager
aio auth:login
aio cloudmanager:org:select
aio config:set cloudmanager_programid 12345
# find the environment ID, then the logs it offers
aio cloudmanager:list-environments
aio cloudmanager:list-available-log-options 67890
After that, two commands do the daily work. tail-log takes the environment ID, the service and the log name. download-logs takes the same three plus an optional number of days, which defaults to one:
# stream the publish Java log and keep only your package
aio cloudmanager:tail-log 67890 publish aemerror | grep com.example.mysite
# fetch three days of Dispatcher logs into ./logs
aio cloudmanager:download-logs 67890 dispatcher aemdispatcher 3 -o ./logs
The program ID comes from the config value set above; pass --programId to override it for one call. The same commands work in a CI job if you authenticate with a service account instead of the browser login.
How do you add a logger for your own code?
Loggers are OSGi factory configurations of org.apache.sling.commons.log.LogManager.factory.config, committed to the repository like any other configuration. Put one file in each run-mode folder of your ui.config module so every environment gets the level it should have:
ui.config/src/main/content/jcr_root/apps/mysite/osgiconfig/
config/org.apache.sling.commons.log.LogManager.factory.config~mysite.cfg.json
config.stage/org.apache.sling.commons.log.LogManager.factory.config~mysite.cfg.json
config.prod/org.apache.sling.commons.log.LogManager.factory.config~mysite.cfg.json
The development version:
{
"org.apache.sling.commons.log.names": ["com.example.mysite"],
"org.apache.sling.commons.log.level": "debug",
"org.apache.sling.commons.log.file": "logs/error.log"
}
The stage and production copies are identical except for the level. Adobe recommends debug on development, warn on stage and error on production. Keep org.apache.sling.commons.log.file at logs/error.log, leave the root org.apache.sling.commons.log.LogManager configuration alone (its INFO level is part of the platform), and don't override the log pattern.
A level that changes without a deployment is handy when production misbehaves. Write the level as an environment variable with a default, "$[env:MYSITE_LOG_LEVEL;default=error]", then set MYSITE_LOG_LEVEL in Cloud Manager when you need more detail. Set it back afterwards: nothing resets it for you, and a forgotten debug on production fills the log and costs performance.
Apache and the Dispatcher are configured in the dispatcher module instead. DISP_LOG_LEVEL and REWRITE_LOG_LEVEL live in the variables file under conf.d/variables (global.vars in the project archetype) and accept error, warn, info and debug in the cloud. The trace levels only work in the local Dispatcher SDK, so rewrite rules are debugged there. These two variables can't come from Cloud Manager environment variables, so a different level per environment uses IfDefine:
Define DISP_LOG_LEVEL debug
<IfDefine ENVIRONMENT_STAGE>
Define DISP_LOG_LEVEL warn
</IfDefine>
<IfDefine ENVIRONMENT_PROD>
Define DISP_LOG_LEVEL error
</IfDefine>
What is log forwarding in AEM as a Cloud Service?
Log forwarding sends every log line from an environment to a system you run. You describe the destination in a YAML file, keep credentials in Cloud Manager secrets, and deploy the file with a config pipeline. Adobe's log forwarding documentation lists these destinations:
| Destination | YAML key | CDN logs |
|---|---|---|
| Amazon S3 | awsS3 | beta |
| Azure Blob Storage | azureBlob | yes |
| Datadog | datadog | yes |
| Dynatrace | dynatrace | beta |
| Elasticsearch / OpenSearch | elasticsearch | yes |
| HTTPS endpoint | https | yes |
| New Relic | newRelic | beta |
| Splunk | splunk | yes |
| Sumo Logic | sumoLogic | yes |
All nine accept AEM and Dispatcher logs. Each forwarded entry carries aem_env_id, aem_env_type, aem_program_id and aem_tier, and a log type such as aemerror, aemaccess, aemdispatcher or aemhttpdaccess; CDN entries arrive as aemcdn.
How do you configure logForwarding.yaml?
Create the file anywhere under a top-level config folder of your Git repository. This one sends AEM, Dispatcher and CDN logs to Splunk on stage and production, with CDN lines going to their own index:
kind: "LogForwarding"
version: "1"
metadata:
envTypes: ["stage", "prod"]
data:
splunk:
default:
enabled: true
host: "splunk-hec.example.com"
port: 443
token: "${{SPLUNK_TOKEN}}"
index: "aemaacs"
cdn:
enabled: true
index: "aemaacs_cdn"
Settings under default apply to both AEM and CDN logs. An aem or cdn block overrides them, and only enabled is required inside it; aem: enabled: false forwards CDN logs alone. The metadata block is optional, and without it the file applies to every environment type the pipeline deploys to.
A plain HTTPS collector and an S3 bucket look like this:
kind: "LogForwarding"
version: "1"
data:
https:
default:
enabled: true
url: "https://logs.example.com/aem"
authHeaderName: "X-Log-Token"
authHeaderValue: "${{HTTPS_LOG_TOKEN}}"
kind: "LogForwarding"
version: "1"
data:
awsS3:
default:
enabled: true
region: "eu-west-1"
bucket: "example-aem-logs"
accessKey: "${{AWS_S3_ACCESS_KEY}}"
secretAccessKey: "${{AWS_S3_SECRET_ACCESS_KEY}}"
For S3, the IAM user needs s3:PutObject, plus s3:AbortMultipartUpload if CDN logs go there too.
Secrets
Every ${{NAME}} reference is resolved from a Cloud Manager environment variable of type Secret. Create it on each environment with Service Applied set to All, so that author, publish and preview all send logs. Never commit a token in the YAML itself.
Deploying the file
Full-stack and web-tier pipelines ignore logForwarding.yaml. Create a config pipeline in Cloud Manager (it's a targeted deployment pipeline) for each environment, point it at the branch with the config folder, and run it. The same pipeline deploys CDN rules and maintenance task settings, so one config folder can hold all of them, each file identified by its kind.
Advanced Networking
A destination on port 443 that accepts traffic from any address needs nothing extra. Add aem: advancedNetworking: true when your collector only trusts a fixed source IP (dedicated egress) or listens on a non-standard port (flexible egress, plus a port value in the YAML). Log forwarding doesn't work over an Advanced Networking VPN. CDN logs never use Advanced Networking at all: Fastly sends them directly, so a firewall in front of your collector has to allow Fastly's published IP ranges.
Where are the logs in AEM 6.5?
On AEM 6.5 and 6.5 LTS the logs are ordinary files. Most of them are in crx-quickstart/logs, and Adobe lists two more log folders, crx-quickstart/launchpad/logs and crx-quickstart/server/logs. The main files are error.log, request.log and access.log. The default level is INFO, so DEBUG messages need a logger configuration.
On 6.5 you also get a live view and your own files. Every logger and writer shows up in the Web Console at /system/console/slinglog (other consoles worth bookmarking are on the AEM consoles list). And you may write to your own file: pair the logger with a writer configuration, org.apache.sling.commons.log.LogManager.factory.writer, whose file name matches the logger's. The writer controls rotation, and Sling's defaults are daily rotation and five kept files:
org.apache.sling.commons.log.LogManager.factory.writer~mysite.cfg.json:
{
"org.apache.sling.commons.log.file": "logs/mysite.log",
"org.apache.sling.commons.log.file.number": 14,
"org.apache.sling.commons.log.file.size": "'.'yyyy-MM-dd"
}
org.apache.sling.commons.log.LogManager.factory.config~mysite.cfg.json:
{
"org.apache.sling.commons.log.names": ["com.example.mysite"],
"org.apache.sling.commons.log.level": "info",
"org.apache.sling.commons.log.file": "logs/mysite.log"
}
Moving that project to AEM as a Cloud Service means dropping the writer and pointing the logger back at logs/error.log. Traversal warnings from slow queries land in the same Java log on both platforms, and reading a traversal warning line by line shows which index the query is missing.
More in Operations, SEO and upgrades
- Robots.txt File in AEM Websites
How to serve a robots.txt from an AEM website: store it in the DAM, map it to /robots.txt with the Sling resource resolver, and allow it through the dispatcher.
- Hide the /content Root Path in AEM Publish and Website URLs
How to remove /content/sitename from public AEM URLs: Sling resource resolver mappings on publish, then mod_rewrite rules and DispatcherUseProcessedURL on the dispatcher.
- AEM Pattern Detector: How to Run It and Read the Report
Run the AEM Pattern Detector with curl, filter its JSON with jq, decode codes like CAV, OU, NCC and OID, and see how it feeds the Best Practices Analyzer.
- Steps to Migrate a Third-Party CMS Website to AEM
The steps of a CMS-to-AEM migration project: analysis, content and asset strategy, design, content migration (manual, automated, hybrid), testing and estimation.
- Generate a Report of Users' Last Login in AEM
How to report every user's last login in AEM 6.5: record it with an AuthenticationInfoPostProcessor service, then query it with an ACS AEM Commons report.