Class AddLoggerComponentTask

  • All Implemented Interfaces:
    SubTask

    public class AddLoggerComponentTask
    extends CreateGenericComponentTask

    A Rhino management sub task for adding a component to a Logger.

    Ant Parameters
    Attribute Type Description Required

    logkey

    String

    Name of the log key to add the component to.

    Yes.

    pluginname

    String

    The Log4J plugin for this component.

    Yes.

    properties

    String

    A comma separated list of configuration properties for the component. 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.

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

    Nested elements

    Element

    Description

    Required

    component

    The components to add to this logger.

    No.

    propertyset

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

    No.

    To use this task provide the configuration of the appender as attributes and sub-elements:

    <slee-management>
       <addloggercomponent logkey="rhino.snmp"pluginname="DynamicThresholdFilter"properties="key=rhinoKey, onMatch=ACCEPT, onMismatch=NEUTRAL">
           <component pluginname="KeyValuePair"properties="key=rhino, value=INFO"/>
       </addloggercomponent>
    </slee-management>
    • Field Detail

      • logKey

        protected String logKey
    • Constructor Detail

      • AddLoggerComponentTask

        public AddLoggerComponentTask()
    • Method Detail

      • execute

        protected void execute()
                        throws org.apache.tools.ant.BuildException
        Overrides:
        execute in class CreateGenericComponentTask
        Throws:
        org.apache.tools.ant.BuildException
      • setLogKey

        public void setLogKey​(String logKey)