Class FormatterConfigurationHelper

java.lang.Object
org.glassfish.main.jul.cfg.ConfigurationHelper
org.glassfish.main.jul.formatter.FormatterConfigurationHelper

public class FormatterConfigurationHelper extends ConfigurationHelper
This is a tool to help with parsing the logging.properties file to configure formatters.

It respects JUL configuration standards, so ie. each formatter knows best how to configure itself, but still can use this helper to parse properties directly to objects instead of plain strings.

Helper also supports custom error handlers.

Author:
David Matejcek
  • Constructor Details

  • Method Details

    • forHandlerId

      public static FormatterConfigurationHelper forHandlerId(HandlerId handlerId)
      Creates helper for parsing formatter settings using the handler's formatter attribute.
      Parameters:
      handlerId -
      Returns:
      instance of the helper which prints errors to the standard error output.
    • forFormatterClass

      public static FormatterConfigurationHelper forFormatterClass(Class<? extends Formatter> formatterClass)
      Creates helper for parsing formatter settings using formatter class name as a prefix.
      Parameters:
      formatterClass -
      Returns:
      instance of the helper which prints errors to the standard error output.