Logging of AEMCaaS CDN Logs | Community
Skip to main content
TylerKrause
Adobe Champion
Adobe Champion
June 11, 2025

Logging of AEMCaaS CDN Logs

  • June 11, 2025
  • 3 replies
  • 553 views

Hey there AEM community - I was curious what you all have implemented for logging of the AEM CDN logs. 

We have a use case in which we're looking to capture what domain is calling the images to download for internal tracking of where they're being called and how recently.

Wanted to understand if anyone has already solved this use case from Square One or see if you have any thoughts on implementation.

Thanks!

Tyler Krause

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

giuseppebaglio
Level 10
June 11, 2025

I think the dispatcher access log can be helpful; you can extract the URL of the requested resource and its referrer. Since this log message has a fixed format, it's easy to isolate those specific fields while ignoring the others. You could think of the log content as if it were in CSV format, with the space character serving as the separator. You could import it into Excel and then use formulas to compute the information you need.

SantoshSai
Community Advisor
Community Advisor
June 11, 2025

Hi @tylerkrause,

Here are a few approaches depending on how your stack is set up:

1. Dispatcher Access Logs (Basic Option)

Yes, as mentioned, AEM Dispatcher logs do record:

  • Requested resource (URI)

  • Referrer (Referer HTTP header)

  • Timestamp

  • Client IP or CDN edge IP

Pros:

  • Easy to enable and parse

  • Available at the edge (before AEM even gets hit)

Cons:

  • Local file storage; requires log aggregation or manual analysis

  • Limited metadata unless enhanced

Enhancement Tip: Instead of parsing with Excel, consider using:

  • Log aggregation tools like Splunk, ELK stack, or FluentBit + S3 + Athena

  • Write simple scripts to extract Referer and Host fields for your use case

2. CDN Logging (Recommended for Scale)

If you're using a CDN (Akamai, CloudFront, Azure CDN, etc.), enable edge logs:

  • These provide detailed logs before the request hits your Dispatcher

  • You can get:

    • Requesting domain (Host or Referer)

    • Timestamp

    • Cache status (HIT/MISS)

    • Geo/IP info

For example:

  • CloudFront: Standard/real-time logs to S3 + Athena/QuickSight for analysis

  • Akamai: DataStream 2 with S3/SIEM export

This is often the most efficient and scalable method to track image usage across domains.

3. AEM Logging (if needed)

You can also log this from within AEM:

  • Add a servlet or filter to log image requests (not ideal unless requests are uncached and hit AEM often)

  • Better for post-processing or tracking authenticated use

4. Bonus: Consider Adding Analytics Tags

If you need richer context (like logged-in user info or app version), consider using frontend-based analytics:

  • Google Analytics / Adobe Analytics

  • Add image beacons or event tracking for image usage

Santosh Sai
kautuk_sahni
Community Manager
Community Manager
June 26, 2025

@tylerkrause Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni