How to override OOB logger configuration like error.log, access.log and upgrade.log
Let say AEM creates OOB Log files like request.log, history.log and upgrade.log files etc. as part of AEM installation. We have different environements and so many inatnces. We want to maintain the same log level (reset to info in every deployment) in all environment for all the files In case of maually someone changed the log level to debug / ERROR level or log file location (to write cloudwatch in aws need to override default log file location). I'm trying to add the logger configuration to override for OOB log files but it isn't overriding instead creating a new entry in the logger configuration.
Any leads.? Thanks.
In AEM, you can override the default logger configuration by creating an OSGi configuration for the org.apache.sling.commons.log.LogManager.factory.config PID
Create a configuration file: Create a file named org.apache.sling.commons.log.LogManager.factory.config-mylogger.cfg.json in your project's src/main/resources/OSGI-INF/config directory. Replace mylogger with the name of your logger.
Thanks @SureshDhulipudi. I agree the above approach for custom logger configuration, but the OOB logger configuration isn't getting override instead creating a new entry in the logger configuration. I tried the above approach by creating logger configuration
2. Created another entry in the OSGI configuration instead of override.
3. Created another configuration file intead of overriding the existing file under AEM installtion folder. (/crx-quickstart/launchpad/config/org/apache/sling/commons/log/logManager/factory)
@madalavenkat7 Did you find the suggestion helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hello @kautuk_sahni , as I mentioned in my comments this issue isn't resolved yet, still looking for more information from other mates.
Views
Replies
Total Likes
Views
Likes
Replies