This post will discuss logging via the Operations Dashboard in AEM 6.0 and beyond, and will also include a short tutorial to set it up for quick troubleshooting for developers and system operators alike.
Have you ever wondered how some developers find the root cause of a lot of AEM problems faster than you can think of ? Yes, you guessed it right. Reading the logs! This blog is going to discuss in brief an alternative way to read logs in AEM 6.0 and above. This method utilizes the Operations Dashboard. Please note that this is NOT a tutorial to set up regular logging in AEM. For that you may want to read this, which is way more powerful. Instead, this method should be used to have a quick check from within the browser for minor errors and issues. This Logging method does not relate to the regular logging system in AEM, for this logging system stores all the mesage in an in-memory storage. So, whatever way you configure your regular AEM logging system is independent of the regular log files and vice-versa, which means, changing the log levels in one of these will never affect the other. Another important point to note is that by default, all the ERROR level messages are logged in the operations dashboard logging system. To see others types of logs messages here, like DEBUG, INFO or WARN, you have to configure the dashboard differently. You can set it up to log messages from certain packages or your entire AEM system. All these can be done by clicking the GEAR icon in the logging page (libs/granite/operations/content/diagnosis.html) within the Operations dashboard.
In your AEM console, go to Tools > Operations > Dashboard > Diagnosis > Log Messages. This is where you will see the logged messages that you choose.
Click the GEAR icon in the upper left corner of this page and you'll see the following screen.
- A log level of WARN will capture all the ERROR and WARN level messages in the chosen package. If root is chosen, all the packages will be considered.
- Similarly, a log level of INFO will capture all the ERROR, WARN and INFO level log messages.
- And, a log level of DEBUG will capture all the levels from the respective package.