org.wildfly.swarm.config.logging

## Class PeriodicSizeRotatingFileHandler<T extends PeriodicSizeRotatingFileHandler<T>>

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

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class PeriodicSizeRotatingFileHandler<T extends PeriodicSizeRotatingFileHandler<T>>
      extends HashMap

  Defines a handler which writes to a file, rotating the log after a time period derived from the given suffix string or after the size of the file grows beyond a certain point and keeping a fixed number of backups. The suffix should be in a format understood by the java.text.SimpleDateFormat. Any backups rotated by the suffix will not be purged during a size rotation.
  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
    `PeriodicSizeRotatingFileHandler(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
    `Boolean` | `append()` Specify whether to append to the target file.
    `T` | `append(Boolean value)` Specify whether to append to the target file.
    `Boolean` | `autoflush()` Automatically flush after each write.
    `T` | `autoflush(Boolean value)` Automatically flush after each write.
    `Boolean` | `enabled()` If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.
    `T` | `enabled(Boolean value)` If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.
    `String` | `encoding()` The character encoding used by this Handler.
    `T` | `encoding(String value)` The character encoding used by this Handler.
    `Map` | `file()` The file description consisting of the path and optional relative to path.
    `T` | `file(Map value)` The file description consisting of the path and optional relative to path.
    `T` | `file(String key, Object value)` The file description consisting of the path and optional relative to path.
    `String` | `filterSpec()` A filter expression value to define a filter.
    `T` | `filterSpec(String value)` A filter expression value to define a filter.
    `String` | `formatter()` Defines a pattern for the formatter.
    `T` | `formatter(String value)` Defines a pattern for the formatter.
    `String` | `getKey()`
    `Level` | `level()` The log level specifying which message levels will be logged by this logger.
    `T` | `level(Level value)` The log level specifying which message levels will be logged by this logger.
    `Integer` | `maxBackupIndex()` The maximum number of backups to keep.
    `T` | `maxBackupIndex(Integer value)` The maximum number of backups to keep.
    `String` | `namedFormatter()` The name of the defined formatter to be used on the handler.
    `T` | `namedFormatter(String value)` The name of the defined formatter to be used on the handler.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `Boolean` | `rotateOnBoot()` Indicates the file should be rotated each time the file attribute is changed.
    `T` | `rotateOnBoot(Boolean value)` Indicates the file should be rotated each time the file attribute is changed.
    `String` | `rotateSize()` The size at which to rotate the log file.
    `T` | `rotateSize(String value)` The size at which to rotate the log file.
    `String` | `suffix()` Set the suffix string.
    `T` | `suffix(String value)` Set the suffix string.

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

    - #### PeriodicSizeRotatingFileHandler

          public PeriodicSizeRotatingFileHandler(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

    - #### append

          public Boolean append()

      Specify whether to append to the target file.

    - #### append

          public T append(Boolean value)

      Specify whether to append to the target file.

    - #### autoflush

          public Boolean autoflush()

      Automatically flush after each write.

    - #### autoflush

          public T autoflush(Boolean value)

      Automatically flush after each write.

    - #### enabled

          public Boolean enabled()

      If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.

    - #### enabled

          public T enabled(Boolean value)

      If set to true the handler is enabled and functioning as normal, if set to false the handler is ignored when processing log messages.

    - #### encoding

          public String encoding()

      The character encoding used by this Handler.

    - #### encoding

          public T encoding(String value)

      The character encoding used by this Handler.

    - #### file

          public Map file()

      The file description consisting of the path and optional relative to path.

    - #### file

          public T file(Map value)

      The file description consisting of the path and optional relative to path.

    - #### file

          public T file(String key,
                        Object value)

      The file description consisting of the path and optional relative to path.

    - #### filterSpec

          public String filterSpec()

      A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))

    - #### filterSpec

          public T filterSpec(String value)

      A filter expression value to define a filter. Example for a filter that does not match a pattern: not(match("JBAS.*"))

    - #### formatter

          public String formatter()

      Defines a pattern for the formatter.

    - #### formatter

          public T formatter(String value)

      Defines a pattern for the formatter.

    - #### level

          public Level level()

      The log level specifying which message levels will be logged by this logger. Message levels lower than this value will be discarded.

    - #### level

          public T level(Level value)

      The log level specifying which message levels will be logged by this logger. Message levels lower than this value will be discarded.

    - #### maxBackupIndex

          public Integer maxBackupIndex()

      The maximum number of backups to keep.

    - #### maxBackupIndex

          public T maxBackupIndex(Integer value)

      The maximum number of backups to keep.

    - #### namedFormatter

          public String namedFormatter()

      The name of the defined formatter to be used on the handler.

    - #### namedFormatter

          public T namedFormatter(String value)

      The name of the defined formatter to be used on the handler.

    - #### rotateOnBoot

          public Boolean rotateOnBoot()

      Indicates the file should be rotated each time the file attribute is changed. This always happens when at initialization time.

    - #### rotateOnBoot

          public T rotateOnBoot(Boolean value)

      Indicates the file should be rotated each time the file attribute is changed. This always happens when at initialization time.

    - #### rotateSize

          public String rotateSize()

      The size at which to rotate the log file.

    - #### rotateSize

          public T rotateSize(String value)

      The size at which to rotate the log file.

    - #### suffix

          public String suffix()

      Set the suffix string. The string is in a format which can be understood by java.text.SimpleDateFormat. The period of the rotation is automatically calculated based on the suffix.

    - #### suffix

          public T suffix(String value)

      Set the suffix string. The string is in a format which can be understood by java.text.SimpleDateFormat. The period of the rotation is automatically calculated based on the suffix.

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