{"record":{"id":"c44035596234cd8d","repo":"apache/beam","slug":"unknown-log-level-level-valid-log-levels-are-validlevels","errorCode":null,"errorMessage":"Unknown log level ${level}. Valid log levels are ${validLevels}","messagePattern":"Unknown log level (.+?)\\. Valid log levels are (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/providers/LoggingTransformProvider.java","lineNumber":105,"sourceCode":"    return Collections.singletonList(OUTPUT_ROWS_TAG);\n  }\n\n  @DefaultSchema(AutoValueSchema.class)\n  @AutoValue\n  public abstract static class Configuration {\n    private static final Map<String, Level> SUPPORTED_LOG_LEVELS =\n        ImmutableMap.of(\"ERROR\", Level.ERROR, \"INFO\", Level.INFO, \"DEBUG\", Level.DEBUG);\n\n    @Nullable\n    public abstract String getLevel();\n\n    public Level getLogLevel() {\n      if (getLevel() == null) {\n        return Level.INFO;\n      } else if (SUPPORTED_LOG_LEVELS.containsKey(getLevel())) {\n        return SUPPORTED_LOG_LEVELS.get(getLevel());\n      } else {\n        throw new IllegalArgumentException(\n            \"Unknown log level \"\n                + getLevel()\n                + \". Valid log levels are \"\n                + ImmutableList.copyOf(SUPPORTED_LOG_LEVELS.keySet()));\n      }\n    }\n\n    @Nullable\n    public abstract String getPrefix();\n\n    public String getNonNullPrefix() {\n      String prefix = getPrefix();\n      return prefix == null ? \"\" : prefix;\n    }\n\n    public static Builder builder() {\n      return new AutoValue_LoggingTransformProvider_Configuration.Builder();\n    }","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/providers/LoggingTransformProvider.java#L87-L123","documentation":"LoggingTransformProvider's LoggingReadTransform.Level config maps configured level strings to java.util.logging Levels. getLogLevel throws IllegalArgumentException when getLevel() is non-null but not one of the supported keys (e.g. 'INFO', 'WARNING', 'SEVERE'), listing the valid levels in the message.","triggerScenarios":"Configuring the logging transform with a level string not present in SUPPORTED_LOG_LEVELS, e.g. 'debug', 'trace', or 'WARN' when only specific keys are supported.","commonSituations":"Using log4j/slf4j level names ('WARN', 'ERROR', 'DEBUG') instead of the java.util.logging names the provider supports; case/typo mistakes in pipeline YAML.","solutions":["Use one of the valid level names listed in the error message (from SUPPORTED_LOG_LEVELS keySet)","Check the provider docs/SUPPORTED_LOG_LEVELS map for exact accepted strings","Omit the level entirely to get the default Level.INFO"],"exampleFix":"// before\nlevel: WARN\n// after\nlevel: WARNING","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"INFO\",\"WARNING\",\"SEVERE\",\"CONFIG\",\"FINE\",\"FINER\",\"FINEST\",\"OFF\",\"ALL\");\nif (level != null && !valid.contains(level)) throw new IllegalArgumentException(\"Invalid log level: \" + level);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the exact java.util.logging level names the provider documents","Avoid slf4j/log4j level spellings like WARN/ERROR/DEBUG in this config"],"tags":["java","apache-beam","logging","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}