Logging is a key element in the development of secure and stable applications. You can use Sling Logging to diagnose major issues in Adobe Experience Manager (AEM), such as slow load times and component errors or page load failures.
AEM allows the configuration for the following through OSGi configurations:
The root logger is configured using Apache Sling Logging Configuration. This defines the global AEM logging settings:
The central log file location
The logging level
Version rotation; either time interval or maximum size
The number of versions to be maintained
The format to use when logging messages
Apache Sling Logging Configuration
By default, logs can be found in the following locations:
crx-quickstart/launchpad/logs
crx-quickstart/server/logs
crx-quickstart/logs
The log levels are as follows:
0 | Fatal error | The action is unsuccessful, and the installer cannot carry on. |
1 | Error | The action has failed. The installation proceeds, but a part of CRX is not installed correctly and will not work. |
2 | Warning | The action has succeeded but ran into problems. CRX may or may not work correctly. |
3 | Information | The action has succeeded. |
Apart from the global settings for logging, AEM allows you to configure specific settings for an individual service:
This enables you to channel log messages into a separate file for a single service.
AEM practices the following to log messages to file:
These elements are linked by the below factors for appropriate elements:
A standard AEM installation includes several Loggers and Writers.
If required, these can be customized, although for most installations the standard configuration is suitable.
Custom Logger / Writer pairs can also be defined:
1. Creates new instance of the Factory Configuration Apache Sling Logging Logger Configuration.
Specify the Log File.
Specify the Logger.
Configure the other parameters as required.
Apache Sling Logging Logger Configuration
2. Create new instances of the Factory Configuration Apache Sling Logging Writer Configuration.
Specify the Log File – which must match that is specified in the Logger.
Configure the other parameters as required.
Apache Sling Logging Writer Configuration
These guidelines should help you better know the logging capabilities of Sling. With Royal Cyber’s AEM expertise you can start logging or expand the scope of any logging you already have. For more information on AEM logger, you can write to us at [email protected] or visit www.royalcyber.com.
1 Comment
I want config file access log. How?