org.wildfly.swarm.config.logging

## Class CustomFormatter<T extends CustomFormatter<T>>

- java.lang.Object
- - org.wildfly.swarm.config.logging.CustomFormatter<T>

-     public class CustomFormatter<T extends CustomFormatter<T>>
      extends Object

  A custom formatter to be used with handlers. Note that most log records are formatted in the printf format. Formatters may require invocation of the org.jboss.logmanager.ExtLogRecord#getFormattedMessage() for the message to be properly formatted.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CustomFormatter(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `String` | `attributeClass()` The logging handler class to be used.
    `T` | `attributeClass(String value)` The logging handler class to be used.
    `String` | `getKey()`
    `String` | `module()` The module that the logging handler depends on.
    `T` | `module(String value)` The module that the logging handler depends on.
    `Map` | `properties()` Defines the properties used for the logging handler.
    `T` | `properties(Map value)` Defines the properties used for the logging handler.
    `T` | `property(String key, Object value)` Defines the properties used for the logging handler.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CustomFormatter

          public CustomFormatter(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### attributeClass

          public String attributeClass()

      The logging handler class to be used.

    - #### attributeClass

          public T attributeClass(String value)

      The logging handler class to be used.

    - #### module

          public String module()

      The module that the logging handler depends on.

    - #### module

          public T module(String value)

      The module that the logging handler depends on.

    - #### properties

          public Map properties()

      Defines the properties used for the logging handler. All properties must be accessible via a setter method.

    - #### properties

          public T properties(Map value)

      Defines the properties used for the logging handler. All properties must be accessible via a setter method.

    - #### property

          public T property(String key,
                            Object value)

      Defines the properties used for the logging handler. All properties must be accessible via a setter method.

Copyright © 2017 JBoss by Red Hat. All rights reserved.