public class CreateConsoleAppenderTask extends CreateAppenderTask
A Rhino management sub task for creating a log appender with output directed to the console.
Attribute | Type | Description | Required |
---|---|---|---|
appendername |
String |
Name of the appender to create. This name must be unique. |
Yes. |
direct |
boolean |
Log directly to the output stream instead of via the System.out/err PrintWriter |
No. |
follow |
boolean |
follow changes to the destination stream of System.out/err. Incompatible with |
No. |
target |
String |
Either "SYSTEM_OUT" or "SYSTEM_ERR". The default is "SYSTEM_OUT". |
No. |
ignoreexceptions |
boolean |
Log exceptions thrown by this appender then ignore them. If set to false propagate to the caller (used to support selective appenders e.g. FailoverAppender). |
No. |
failonerror |
boolean |
Flag to control failure behaviour.
If 'true', the sub task will throw a |
No. Default value is taken from the Rhino management parent task. |
Element |
Description |
Required |
filter |
A filter to select events that will be reported by this appender. |
No. |
layout |
The layout to use to format log events. If no layout is supplied the default pattern layout of "%m%n" will be used. |
No. |
This task will throw a NonFatalBuildException
if the appender cannot be created, eg.
an appender with the same name already exists.
appenderName
components, properties
client, failOnError
Constructor and Description |
---|
CreateConsoleAppenderTask() |
Modifier and Type | Method and Description |
---|---|
String |
getPluginname() |
void |
setDirect(boolean direct) |
void |
setFollow(boolean follow) |
void |
setTarget(String target) |
protected void |
validateParameters() |
execute, setAppenderName, setIgnoreExceptions
addComponent, addPropertyNotNull, addPropertySet, allTrue, buildGenericComponentData, expandPropertySets, getComponents, getPropertiesArray, setPluginname, setProperties, validateHasProperty
getExceptionAndMessage, getFailOnError, getMessage, getOverrideFailOnError, getParent, getProject, log, run, setFailOnError
protected void validateParameters() throws org.apache.tools.ant.BuildException
validateParameters
in class CreateAppenderTask
org.apache.tools.ant.BuildException
public String getPluginname()
getPluginname
in class CreateGenericComponentTask
public void setDirect(boolean direct)
public void setFollow(boolean follow)
public void setTarget(String target)