public final class LogForwardingService extends Object
LogForwardingProvider
Constructor and Description |
---|
LogForwardingService(String providerClassname)
Create a new LogForwardingService, based on the provider providerClassname.
|
Modifier and Type | Method and Description |
---|---|
void |
addAppender(String loggerName,
org.apache.log4j.Appender appender) |
AppenderProvider |
getAppenderProvider()
Create an appender provider that contains an appender to the server created by initialize() method.
|
URI |
getServerURI()
Return the URI on which the log server is bound.
|
void |
initialize()
Instantiate the LogForwardingProvider specified by providerClassname value,
and create and start the log server.
|
void |
removeAllAppenders(String loggerName) |
void |
removeLogger(String loggerName) |
void |
terminate()
Terminate this logging service.
|
public LogForwardingService(String providerClassname)
providerClassname
- the classname of the provider that will be used (see LogForwardingProvider
).public void addAppender(String loggerName, org.apache.log4j.Appender appender)
public void removeAllAppenders(String loggerName)
public void removeLogger(String loggerName)
public final void initialize() throws LogForwardingException
LogForwardingException
- if the LogForwardingProvider cannot be instantiated, or if the log server cannot be created.IllegalStateException
- if the LogForwardingService is already initialized.public final void terminate() throws LogForwardingException
LogForwardingException
- if the log server started by the LogForwardingProvider cannot be terminated.public final AppenderProvider getAppenderProvider() throws LogForwardingException
LogForwardingException
- if the appender provider cannot be created.IllegalStateException
- if the LogForwardingService is not initialized.public final URI getServerURI()
IllegalStateException
- if the LogForwardingService is not initialized.