org.wildfly.swarm.config.logging

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

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - org.wildfly.swarm.config.logging.CustomFormatter<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class CustomFormatter<T extends CustomFormatter<T>>
      extends HashMap

  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.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### 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.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### 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.