public class PaxLoggingServiceImpl extends Object implements org.ops4j.pax.logging.PaxLoggingService, org.knopflerfish.service.log.LogService, org.osgi.framework.ServiceFactory<Object>
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) |
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. |
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)
ManagedService-like method but not requiring Configuration Admin
|
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.PaxLoggingServicepublic int getLogLevel()
getLogLevel in interface org.ops4j.pax.logging.PaxLoggingServicepublic void log(int level,
String message)
log in interface org.osgi.service.log.LogServicepublic void log(int level,
String message,
Throwable exception)
log in interface org.osgi.service.log.LogServicepublic void log(org.osgi.framework.ServiceReference sr,
int level,
String message)
log in interface org.osgi.service.log.LogServicepublic void log(org.osgi.framework.ServiceReference sr,
int level,
String message,
Throwable exception)
log in interface org.osgi.service.log.LogServicepublic org.ops4j.pax.logging.PaxContext getPaxContext()
getPaxContext in interface org.ops4j.pax.logging.PaxLoggingServicepublic 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 void updated(Dictionary<String,?> configuration)
configuration - 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<Object>Copyright © 2006–2022 OPS4J - Open Participation Software for Java. All rights reserved.