Hi Xav,
no, the service is org.apache.karaf.log.core.LogService. So, you have to do:
ServiceReference<LogService> ref = (ServiceReference<LogService>)
bc.getServiceReference(LogService.class.getName());
The LogService interface is provided by org.apache.karaf.log.core bundle.
For the LogMBean, you have to access using the MBeanServer. The
ObjectName is org.apache.karaf:type=log,name=*.
Regards
JB
On 07/11/2014 03:53 PM, xav wrote:
ok, but with LogMBean, is it a service ?? this name is? I try with:
ServiceReference<LogMBean> sref = (ServiceReference<LogMBean>)
bc.getServiceReference(LogMBean.class.getName());
But not found, the sref is null and to LogMBean logMBean, how can use it?
Regards
Xav
--
View this message in context:
http://karaf.922171.n3.nabble.com/Karaf-2-3-5-Set-the-log-Level-programmatically-tp4034161p4034170.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com