{"record":{"id":"d09c330389064184","repo":"projectlombok/lombok","slug":"no-logger-factory-method-parameters-specified","errorCode":null,"errorMessage":"No logger factory method parameters specified.","messagePattern":"No logger factory method parameters specified\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/core/lombok/core/configuration/LogDeclaration.java","lineNumber":76,"sourceCode":"\t\tTypeName loggerType = TypeName.valueOf(matcher.group(1));\n\t\tif (loggerType == null) loggerType = loggerFactoryType;\n\t\tIdentifierName loggerFactoryMethod = IdentifierName.valueOf(matcher.group(3));\n\t\tList<List<LogFactoryParameter>> allParameters = parseParameters(matcher.group(4));\n\t\t\n\t\tList<LogFactoryParameter> parametersWithoutTopic = null;\n\t\tList<LogFactoryParameter> parametersWithTopic = null;\n\t\tfor (List<LogFactoryParameter> parameters: allParameters) {\n\t\t\tif (parameters.contains(LogFactoryParameter.TOPIC)) {\n\t\t\t\tif (parametersWithTopic != null) throw new IllegalArgumentException(\"There is more than one parameter definition that includes TOPIC: \" + parametersWithTopic + \" and \" + parameters);\n\t\t\t\tparametersWithTopic = parameters;\n\t\t\t} else {\n\t\t\t\tif (parametersWithoutTopic != null) throw new IllegalArgumentException(\"There is more than one parmaeter definition that does not include TOPIC: \" + parametersWithoutTopic + \" and \" + parameters);\n\t\t\t\tparametersWithoutTopic = parameters;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// sanity check (the pattern should disallow this situation\n\t\tif (parametersWithoutTopic == null && parametersWithTopic == null) throw new IllegalArgumentException(\"No logger factory method parameters specified.\");\n\t\t\n\t\treturn new LogDeclaration(loggerType, loggerFactoryType, loggerFactoryMethod, parametersWithoutTopic, parametersWithTopic);\n\t}\n\t\n\tprivate static List<List<LogFactoryParameter>> parseParameters(String parametersDefinitions) {\n\t\tList<List<LogFactoryParameter>> allParameters = new ArrayList<List<LogFactoryParameter>>();\n\t\tMatcher matcher = PARAMETERS_PATTERN.matcher(parametersDefinitions);\n\t\twhile (matcher.find()) {\n\t\t\tString parametersDefinition = matcher.group(1);\n\t\t\tList<LogFactoryParameter> parameters = new ArrayList<LogFactoryParameter>();\n\t\t\tif (!parametersDefinition.isEmpty()) { \n\t\t\t\tfor (String parameter : parametersDefinition.split(\",\")) {\n\t\t\t\t\tparameters.add(LogFactoryParameter.valueOf(parameter));\n\t\t\t\t}\n\t\t\t}\n\t\t\tallParameters.add(parameters);\n\t\t}\n\t\treturn allParameters;","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/core/lombok/core/configuration/LogDeclaration.java#L58-L94","documentation":"After classifying parameter lists, LogDeclaration.valueOf performs a sanity check that at least one list (with or without TOPIC) exists. If the parameter section parsed to nothing, this IllegalArgumentException is thrown (normally the declaration regex prevents reaching it).","triggerScenarios":"LogDeclaration.valueOf receiving a declaration that matches the pattern but yields an empty parameter-group list — e.g. a blank parameter section that slipped past the regex.","commonSituations":"Rare edge case with a declaration like 'Factory.create' where the regex matched an empty/whitespace parameter area; usually indicates a malformed custom logger declaration in lombok.config.","solutions":["Add an explicit parameter list to the factory method, e.g. '(TOPIC)' or '()'.","Re-check that the declaration string is complete and not truncated after the method name.","Ensure no invisible characters or line continuations drop the parameter section."],"exampleFix":"// before\nlombok.log.customDeclaration = com.acme.F.create\n// after\nlombok.log.customDeclaration = com.acme.F.create(TOPIC)","handlingStrategy":"validation","validationCode":"boolean hasParameterSection(String decl) {\n  int open = decl.indexOf('(');\n  return open != -1 && decl.indexOf(')', open) != -1 && !decl.substring(open + 1, decl.indexOf(')', open)).trim().isEmpty() || decl.matches(\".*\\\\(\\\\s*\\\\w+.*\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  LogDeclaration decl = LogDeclaration.valueOf(cfgValue);\n} catch (IllegalArgumentException e) {\n  // append a parameter list like (TOPIC) to the factory method\n}","preventionTips":["Always write an explicit parameter list after the factory method name.","Avoid truncated declarations in lombok.config line continuations.","Sanity-check the final config file for missing '(TOPIC)'/'()' segments."],"tags":["lombok","configuration","logging"],"backgroundTag":"missing-required-argument","analyzedSha":"6d6a3e9fec0a9555702561fbeb8eac836575116e","analyzedAt":"2026-09-07T23:18:01.841Z","contentChangedAt":"2026-09-07T23:18:01.841Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}