public class PaxLoggingServiceImpl extends Object implements org.ops4j.pax.logging.PaxLoggingService, org.osgi.framework.ServiceFactory<Object>
Constructor and Description |
---|
PaxLoggingServiceImpl(org.osgi.framework.BundleContext bundleContext,
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 |
---|---|
<L extends org.osgi.service.log.Logger> |
getLogger(org.osgi.framework.Bundle bundle,
String name,
Class<L> loggerType) |
org.ops4j.pax.logging.PaxLogger |
getLogger(org.osgi.framework.Bundle bundle,
String category,
String fqcn) |
org.osgi.service.log.Logger |
getLogger(Class<?> clazz) |
<L extends org.osgi.service.log.Logger> |
getLogger(Class<?> clazz,
Class<L> loggerType) |
org.osgi.service.log.Logger |
getLogger(String name) |
<L extends org.osgi.service.log.Logger> |
getLogger(String name,
Class<L> loggerType) |
org.osgi.service.log.LogLevel |
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) |
void |
setDefaultConfiguration(Dictionary<String,String> config)
When there's system/context property specified using
PaxLoggingConstants.LOGGING_CFG_PROPERTY_FILE ,
and ConfigurationAdmin is available, Pax Logging may first get null configuration. |
void |
shutdown()
Shut down the Pax Logging service.
|
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
Object service) |
public PaxLoggingServiceImpl(org.osgi.framework.BundleContext bundleContext, org.ops4j.pax.logging.spi.support.LogReaderServiceImpl logReader, org.ops4j.pax.logging.EventAdminPoster eventAdmin, org.ops4j.pax.logging.spi.support.ConfigurationNotifier configNotifier)
public 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 org.osgi.service.log.LogLevel 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 org.osgi.service.log.Logger getLogger(String name)
getLogger
in interface org.osgi.service.log.LoggerFactory
public org.osgi.service.log.Logger getLogger(Class<?> clazz)
getLogger
in interface org.osgi.service.log.LoggerFactory
public <L extends org.osgi.service.log.Logger> L getLogger(String name, Class<L> loggerType)
getLogger
in interface org.osgi.service.log.LoggerFactory
public <L extends org.osgi.service.log.Logger> L getLogger(Class<?> clazz, Class<L> loggerType)
getLogger
in interface org.osgi.service.log.LoggerFactory
public <L extends org.osgi.service.log.Logger> L getLogger(org.osgi.framework.Bundle bundle, String name, Class<L> loggerType)
getLogger
in interface org.osgi.service.log.LoggerFactory
public void setDefaultConfiguration(Dictionary<String,String> config)
PaxLoggingConstants.LOGGING_CFG_PROPERTY_FILE
,
and ConfigurationAdmin is available, Pax Logging may first get null configuration. When "default configuration"
is set before that, we'll use it instead of empty configuration.config
- public Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
ServiceFactory
) except the
reference to client bundle.getService
in interface org.osgi.framework.ServiceFactory<Object>
Copyright © 2006–2021 OPS4J - Open Participation Software for Java. All rights reserved.