Interface ConfigurationParser

All Known Subinterfaces:
ConfigurationMapper

@ProviderType public interface ConfigurationParser
Interface to be implemented by format providers that can parse a configuration file format.

Implementations of this class should be registered with ServiceLoader.

  • Method Details

    • getInputFormat

      String getInputFormat()
      A short string that identifies the format supported by this parser.

      For example, "v2:xml" or "v1:properties".

    • getInputFormatDescription

      String getInputFormatDescription()
      A description of the supported format for self-documentation purposes.
    • parse

      ConfigurationNode parse(InputStream inputStream) throws IOException
      Parses a configuration file into a tree of configuration nodes.

      The returned tree should represent a valid Log4j Core 2 configuration.

      Parameters:
      inputStream - The input configuration file.
      Returns:
      A tree of configuration nodes.
      Throws:
      IOException - If a parsing error occurs.