A Rhino management sub task for creating a log appender.

Ant Parameters
Attribute Type Description Required

appendername

String

Name of the appender to create. This name must be unique.

Yes.

pluginname

String

The Log4J plugin for this appender

Yes.

properties

String

A comma separated list of configuration properties for the appender. Each property is a key=value pair. Use this or a nested propertyset.

No.

failonerror

boolean

Flag to control failure behaviour. If 'true', the sub task will throw a BuildException when an error is encountered. If 'false', the sub task will throw a NonFatalBuildException instead of a BuildException under specific circumstances. See below for conditions (if any) which will cause a NonFatalBuildException.

No. Default value is taken from the Rhino management parent task.

Nested elements

Element

Description

Required

propertyset

Configuration properties for this appender. Alternative to the properties attribute.

No.

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.

component

Additional components such as loggerFields for SyslogAppender, KeyValuePairs, etc. Multiple components may be specified. See CreateGenericComponentTask.

No

NonFatalBuildException throw conditions
  • This task will throw a NonFatalBuildException if the appender cannot be created, eg. an appender with the same name already exists.

To use this task provide the configuration of the appender as attributes and subelements:

<property name="fileName" value="baz"/>
<slee-management>
    <createappender name="foo" properties="fileName=baz" pluginname="File"/>
    <createappender name="bar" pluginname="File">
        <propertyset>
            <propertyref name="fileName"/>
        </propertyset>
        <component pluginname="filters">
            <component pluginname="BurstFilter" properties="level=WARN,rate=3"/>
            <component pluginname="ThresholdFilter">
                <component pluginname="KeyValuePair" properties="key=rhino, value=INFO"/>
            </component>
        </component>
        <component pluginname="PatternLayout" properties="pattern=%m"/>
    </createappender>
</slee-management>
Previous page Next page
Rhino Version 2.6.1