AEM has supported logging since the beginning and fundamentally, the logging implementation between AEM as a Cloud Service, AEM in Adobe Managed Services and AEM 6 are very similar. However, since AEM Cloud Service is executed as a Cloud Service, and orchestrated as containers, you can't SSH into the server to look at the logs to diagnose issues.
So how do we get logs in AEM Cloud Service and what more should developers consider when writing logs for a cloud platform like AEM Cloud Service?
Getting Logs in AEM Cloud Service
In AEM as a Cloud Service, the logs from your containers are automatically collected and can be downloaded via Cloud Manager or forwarded to your own Splunk service. Forwarding logs to Splunk allows your organization to seamlessly consume logs from AEM and develop your own monitoring and metrics for your AEM application or website.
Great! Now you have access to the logs for your instance. So how do you ensure your logs provide not just more data but insights?
Why do we log?
There are many reasons we may add logging, some of the more common ones include:
debugging issues during the development process
gathering event statistics to derive data / trends
monitoring error events to identify issues
monitoring events to identify activity