quarkusio/quarkus · error · IllegalArgumentException

Unable to convert %s (obtained from the %s system property)

Error message

Unable to convert %s (obtained from the %s system property) into a known logging level.

What it means

InitialConfigurator initializes the bootstrap logging layer and reads the minimum log level from a system property (quarkus.log.min-level style SYS_PROP_NAME). If the property value cannot be parsed as a java.util.logging Level name, it throws an IllegalArgumentException naming both the bad value and the property. This happens in the static/instance initializer, so it fails fast at logging setup.

Source

Thrown at independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/logging/InitialConfigurator.java:29

/**
 *
 */
public final class InitialConfigurator implements LogContextInitializer {

    public static final QuarkusDelayedHandler DELAYED_HANDLER = new QuarkusDelayedHandler();
    private static final Level MIN_LEVEL;

    private static final String SYS_PROP_NAME = "logging.initial-configurator.min-level";

    static {
        Level minLevel = Level.ALL;
        String minLevelSysProp = System.getProperty(SYS_PROP_NAME);
        if (minLevelSysProp != null) {
            try {
                minLevel = Level.parse(minLevelSysProp);
            } catch (IllegalArgumentException ignored) {
                throw new IllegalArgumentException(
                        String.format("Unable to convert %s (obtained from the %s system property) into a known logging level.",
                                minLevelSysProp, SYS_PROP_NAME));
            }
        }
        MIN_LEVEL = minLevel;
    }

    @Override
    public Level getMinimumLevel(final String loggerName) {
        return MIN_LEVEL;
    }

    @Override
    public Level getInitialLevel(final String loggerName) {
        return loggerName.isEmpty() ? Level.ALL : null;
    }

    @Override

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set the property to a valid Level name: FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, ALL, or OFF
  2. Check the exact value with: printenv / java -XshowSettings:properties and correct typos or stray whitespace
  3. Use a supported alias accepted by Level.parse (e.g. 'WARN' and 'warning' map to WARNING)
  4. Remove the system property to fall back to the default Level.ALL

Example fix

// before
java -Dquarkus.log.min-level=VERBOSE -jar app.jar
// after
java -Dquarkus.log.min-level=INFO -jar app.jar
Defensive patterns

Strategy: validation

Validate before calling

String v = System.getProperty("quarkus.log.min-level");
if (v != null) {
    try { java.util.logging.Level.parse(v); }
    catch (IllegalArgumentException e) { throw new IllegalStateException("Invalid min-level: " + v); }
}

Try / catch

try {
    new InitialConfigurator();
} catch (IllegalArgumentException e) {
    log.error("Set a valid java.util.logging Level name for the min-level property");
}

Prevention

When it happens

Trigger: Starting an application (or bootstrap runner) with the min-level system property set to an unknown level string, e.g. -Dquarkus.log.min-level=VERBOSE or 'warn ' with trailing whitespace or wrong case-sensitive name.

Common situations: Typo in a launch script or IDE run configuration; copying level names from a different logging framework (e.g. 'WARN' is fine but 'verbose'/'trace2' is not); Docker/K8s env passed via -D with quoting issues.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/ab5572cae15ce4c9. Report an issue: GitHub.