public class PaxLoggingServiceImpl extends Object implements org.ops4j.pax.logging.PaxLoggingService, org.knopflerfish.service.log.LogService, org.osgi.service.cm.ManagedService, org.osgi.framework.ServiceFactory
PaxLoggingService
. It's a ServiceFactory
, so each
bundle will get own instance of this service.Constructor and Description |
---|
PaxLoggingServiceImpl(org.osgi.framework.BundleContext context,
org.ops4j.pax.logging.spi.support.LogReaderServiceImpl logReader,
org.ops4j.pax.logging.EventAdminPoster eventAdmin,
org.ops4j.pax.logging.spi.support.ConfigurationNotifier configNotifier) |
Modifier and Type | Method and Description |
---|---|
org.ops4j.pax.logging.PaxLogger |
getLogger(org.osgi.framework.Bundle bundle,
String category,
String fqcn) |
int |
getLogLevel() |
org.ops4j.pax.logging.PaxContext |
getPaxContext() |
Object |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration)
Use local class to delegate calls to underlying instance while keeping bundle reference.
|
void |
log(int level,
String message) |
void |
log(int level,
String message,
Throwable exception) |
void |
log(org.osgi.framework.ServiceReference sr,
int level,
String message) |
void |
log(org.osgi.framework.ServiceReference sr,
int level,
String message,
Throwable exception) |
protected void |
shutdown()
Shut down the Pax Logging service.
|
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
Object service) |
void |
updated(Dictionary<String,?> configuration) |
public PaxLoggingServiceImpl(org.osgi.framework.BundleContext context, org.ops4j.pax.logging.spi.support.LogReaderServiceImpl logReader, org.ops4j.pax.logging.EventAdminPoster eventAdmin, org.ops4j.pax.logging.spi.support.ConfigurationNotifier configNotifier)
protected void shutdown()
public org.ops4j.pax.logging.PaxLogger getLogger(org.osgi.framework.Bundle bundle, String category, String fqcn)
getLogger
in interface org.ops4j.pax.logging.PaxLoggingService
public int getLogLevel()
getLogLevel
in interface org.ops4j.pax.logging.PaxLoggingService
public void log(int level, String message)
log
in interface org.osgi.service.log.LogService
public void log(int level, String message, Throwable exception)
log
in interface org.osgi.service.log.LogService
public void log(org.osgi.framework.ServiceReference sr, int level, String message)
log
in interface org.osgi.service.log.LogService
public void log(org.osgi.framework.ServiceReference sr, int level, String message, Throwable exception)
log
in interface org.osgi.service.log.LogService
public org.ops4j.pax.logging.PaxContext getPaxContext()
getPaxContext
in interface org.ops4j.pax.logging.PaxLoggingService
public void updated(Dictionary<String,?> configuration) throws org.osgi.service.cm.ConfigurationException
updated
in interface org.osgi.service.cm.ManagedService
org.osgi.service.cm.ConfigurationException
public Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
Use local class to delegate calls to underlying instance while keeping bundle reference.
We don't need anything special from bundle-scoped service (ServiceFactory
) except the
reference to client bundle.
getService
in interface org.osgi.framework.ServiceFactory
public void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration, Object service)
ungetService
in interface org.osgi.framework.ServiceFactory
Copyright © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.