I'm configuring the Apache Sling Logging Logger in AEM, but I noticed that the Logger field doesn't have a text input box to specify logger names.
I also clicked on "+" to add a logger, but it's not getting saved.
Has anyone encountered this issue before? Any insights on the cause or a possible fix? Appreciate your help!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @ShubhamAEM
The issue arises because the log level value for 'Information' is missing, which is a required property for the logger configuration. If you attempt to save the configuration with the other four levels—Trace, Debug, Warning, and Error—it should work. However, the missing 'Information' value prevents the configuration from being saved through the Felix console.
As a workaround, you can save the configuration with any other log level and later change it to 'Information' from CRX/DE or the configuration file persisted under /apps/system. This should resolve the issue.
It appears to be a product issue in the latest release, so you may want to raise a support ticket to get it fixed. In the meantime, please follow the above workaround.
Hope this helps.
Thanks,
Asutosh
Hi @ShubhamAEM ,
This issue can occur due to several reasons in AEM’s Apache Sling Logging Logger Configuration. Here are some potential causes and solutions:
Possible Causes & Fixes
1. Missing Permissions
Ensure that your user has sufficient permissions to modify OSGi configurations:
- Try updating the logger as an admin user.
- Check permissions under /system/console/configMgr.
2. Browser Cache Issues
Sometimes, browser caching can cause UI elements not to render properly:
- Try opening the OSGi Console (/system/console/configMgr) in Incognito Mode.
- Clear your browser cache and reload the page.
3. AEM OSGi Console UI Issue
There could be a UI bug where the input box is missing:
- Directly edit the configuration via CRXDE at:
/apps/system/config/org.apache.sling.commons.log.LogManager.factory.config-xxxx.xml
- Add the org.apache.sling.commons.log.names property manually.
4. OSGi Configuration Not Persisting
If clicking Save doesn’t work, the configuration might not be persisting due to a repository issue:
- Restart AEM (stop and start the instance).
- Check error logs (logs/error.log) for any persistence errors.
5. Check for Configuration Conflicts
If another configuration already exists with the same Persistent Identifier (PID), it might override your changes:
- Go to /system/console/configMgr and search for org.apache.sling.commons.log.LogManager.factory.config.
- Delete duplicate or conflicting configurations and reapply your settings.
Final Workaround (If UI Is Not Working)
If the UI still doesn’t allow adding a logger, try configuring it via OSGi Console API:
1. Go to:
http://<AEM_HOST>:<PORT>/system/console/configMgr/org.apache.sling.commons.log.LogManager.factory.config
2. Manually add a new logger configuration.
3. Click Save and restart AEM.
Regards,
Amit Vishwakarma
Views
Replies
Total Likes
Hi @ShubhamAEM , if your concern is about log file name ex: test123.log then you need to give your custom log name then in the second field give name as logs/test123.log and the filed Logger is to add qualified package names or full path until your java class like co.weretail.core......TestServlet.java.
The reason why your log file is not getting saved even after providing Logger value is because in the second filed you might not have changes the value logs/error.log. Change this to logs/<your-log-name>.log and then you will be able to see your new logger.
Note: New log files with same name as existing logs will not be created as the a log with same name is present.
Thanks
Ramesh
Views
Replies
Total Likes
Hi @ShubhamAEM
The issue arises because the log level value for 'Information' is missing, which is a required property for the logger configuration. If you attempt to save the configuration with the other four levels—Trace, Debug, Warning, and Error—it should work. However, the missing 'Information' value prevents the configuration from being saved through the Felix console.
As a workaround, you can save the configuration with any other log level and later change it to 'Information' from CRX/DE or the configuration file persisted under /apps/system. This should resolve the issue.
It appears to be a product issue in the latest release, so you may want to raise a support ticket to get it fixed. In the meantime, please follow the above workaround.
Hope this helps.
Thanks,
Asutosh
Views
Likes
Replies
Views
Likes
Replies