Class ConfigDiagnostic

java.lang.Object
io.quarkus.runtime.configuration.ConfigDiagnostic

public final class ConfigDiagnostic extends Object
Utility methods to log configuration problems.
  • Method Details

    • invalidValue

      public static void invalidValue(String name, IllegalArgumentException ex)
    • missingValue

      public static void missingValue(String name, NoSuchElementException ex)
    • duplicate

      public static void duplicate(String name)
    • deprecated

      public static void deprecated(String name)
    • unknown

      public static void unknown(String name)
    • unknown

      public static void unknown(NameIterator name)
    • unknownProperties

      public static void unknownProperties(Set<String> properties)
      Report any unused properties.
      The list of unused properties may contain false positives. This is caused when an environment variable is set up, and we cannot determine correctly if it was used or not.
      Environment variables require a conversion to regular property names so a Map can be properly populated when iterating Config.getPropertyNames(). Because an Environment variable name may match multiple property names, we try the best effort to report unknowns by matching used properties in their Environment variable name format.
      Parameters:
      properties - the set of possible unused properties
    • unknownRunTime

      public static void unknownRunTime(String name)
    • unknownRunTime

      public static void unknownRunTime(NameIterator name)
    • unknownPropertiesRuntime

      public static void unknownPropertiesRuntime(Set<String> properties)
    • isError

      public static boolean isError()
      Determine if a fatal configuration error has occurred.
      Returns:
      true if a fatal configuration error has occurred
    • resetError

      public static void resetError()
      Reset the config error status (for e.g. testing).
    • getNiceErrorMessage

      public static String getNiceErrorMessage()
    • getErrorKeys

      public static Set<String> getErrorKeys()
    • configFiles

      public static Set<String> configFiles(Path configFilesLocation) throws IOException
      Throws:
      IOException
    • configFilesFromLocations

      public static Set<String> configFilesFromLocations() throws Exception
      Throws:
      Exception
    • unknownConfigFiles

      public static void unknownConfigFiles(Set<String> configFiles)