Hi
I am trying to get the file name configured for the logger under /system/console/slinglog in my java application. for e.g. log.history is to mapped to "logs/history.log" so I want to get the "logs/history.log" if I provide "log.history"
Thanks in advance for taking time and helping!
Thanks
Basheer
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Use the configAdmin service and do something like
configAdmin.listConfigurations("org.apache.sling.commons.log.LogManager.factory.config.*");
to find all log configurations. Then you have a logging configurations available in the system.
I haven't tested it, but it should work.
But: I cannot think of any reason, why you want to do it.
Views
Replies
Total Likes
Hi,
Use the configAdmin service and do something like
configAdmin.listConfigurations("org.apache.sling.commons.log.LogManager.factory.config.*");
to find all log configurations. Then you have a logging configurations available in the system.
I haven't tested it, but it should work.
But: I cannot think of any reason, why you want to do it.
Views
Replies
Total Likes
Thanks for the response. I tried last night the same option and it worked. Filter string within listConfigurations method is little different as below.
configAdmin.listConfigurations("(service.pid=org.apache.sling.commons.log.LogManager.factory.config.*)")
The reason is why I want to do this is I am trying to read the history.log file for the events
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies