public class ConfigureLoggerTask extends AbstractBaseTask
A Rhino management sub task for configuring a logger.
Attribute | Description | Required |
---|---|---|
failonerror |
Flag to control failure behaviour.
If 'true', the sub task will throw a |
No. Default value is taken from the Rhino management parent task. |
logKey |
The name of the logger to configure. |
Yes. |
level |
Logger level. |
No. |
additivity |
Boolean value indicating logger additivity. |
No. If not specified, the default value for loggers is used. |
asynchronous |
Boolean value indicating if the logger should be asynchronous. |
No. If not specified, the default value for loggers is used. |
Element |
Description |
Required |
appenderref |
The name of an appender to attach to the logger.
Multiple appender references may be specified.
See |
No. |
component |
A plugin component of for this logger.
Multiple components may be specified.
See |
No. |
This task will never throw a NonFatalBuildException
. It will always fail (throw a BuildException
) on errors.
Modifier and Type | Class and Description |
---|---|
static class |
ConfigureLoggerTask.AppenderRef
A nested element that identifies a reference to a logging appender.
|
client, failOnError
Constructor and Description |
---|
ConfigureLoggerTask() |
Modifier and Type | Method and Description |
---|---|
void |
addComponent(CreateGenericComponentTask component) |
void |
addConfiguredAppenderRef(ConfigureLoggerTask.AppenderRef ref) |
protected void |
execute() |
void |
setAdditivity(boolean additivity) |
void |
setAsynchronous(boolean asynchronous) |
void |
setLevel(String level) |
void |
setLogKey(String logKey) |
protected void |
validateParameters() |
getExceptionAndMessage, getFailOnError, getMessage, getOverrideFailOnError, getParent, getProject, log, run, setFailOnError
protected void execute() throws org.apache.tools.ant.BuildException
execute
in class AbstractBaseTask
org.apache.tools.ant.BuildException
protected void validateParameters() throws org.apache.tools.ant.BuildException
validateParameters
in class AbstractBaseTask
org.apache.tools.ant.BuildException
public void setLogKey(String logKey)
public void setLevel(String level)
public void setAdditivity(boolean additivity)
public void setAsynchronous(boolean asynchronous)
public void addConfiguredAppenderRef(ConfigureLoggerTask.AppenderRef ref)
public void addComponent(CreateGenericComponentTask component)