{"record":{"id":"7e9dc6489d0bb5ea","repo":"alibaba/nacos","slug":"10000-7e9dc6","errorCode":"10000","errorMessage":"Log name is required.","messagePattern":"Log name is required\\.","errorType":"validation","errorClass":"NacosApiException","httpStatus":400,"severity":"warning","filePath":"core/src/main/java/com/alibaba/nacos/core/model/request/LogUpdateRequest.java","lineNumber":54,"sourceCode":"        return logName;\n    }\n    \n    public void setLogName(String logName) {\n        this.logName = logName;\n    }\n    \n    public String getLogLevel() {\n        return logLevel;\n    }\n    \n    public void setLogLevel(String logLevel) {\n        this.logLevel = logLevel;\n    }\n    \n    @Override\n    public void validate() throws NacosApiException {\n        if (StringUtils.isBlank(logName)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Log name is required.\");\n        }\n        if (StringUtils.isBlank(logLevel)) {\n            throw new NacosApiException(NacosApiException.INVALID_PARAM,\n                ErrorCode.PARAMETER_MISSING,\n                \"Log level is required.\");\n        }\n    }\n}\n","sourceCodeStart":36,"sourceCodeEnd":65,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/core/src/main/java/com/alibaba/nacos/core/model/request/LogUpdateRequest.java#L36-L65","documentation":"LogUpdateRequest.validate() requires a non-blank logName for the runtime log-level API (PUT /v3/admin/core/ops/log). It throws NacosApiException HTTP 400 / ErrorCode.PARAMETER_MISSING (10000). logName must be a registered SLF4J logger name known to the server (e.g. \"com.alibaba.nacos\", \"config-service\", or any logger declared via Loggers).","triggerScenarios":"PUT /v3/admin/core/ops/log with a JSON body missing \"logName\" or with an empty string, e.g. {\"logLevel\":\"DEBUG\"}.","commonSituations":"Client sends only the level; wrong JSON key (e.g. \"loggerName\"); trying to target a logger name that is not registered on the server.","solutions":["Send both logName and logLevel in the body.","Use an exact registered logger name (inspect nacos logs or Loggers registry).","Use \"com.alibaba.nacos\" as a safe root logger name."],"exampleFix":"// before\nPUT /v3/admin/core/ops/log\n{\"logLevel\":\"DEBUG\"}\n// after\n{\"logName\":\"com.alibaba.nacos\",\"logLevel\":\"DEBUG\"}","handlingStrategy":"validation","validationCode":"if (logName == null || logName.isBlank()) {\n    throw new IllegalArgumentException(\"logName is required\");\n}\n// then PUT /v3/admin/core/ops/log {\"logName\":logName,\"logLevel\":logLevel}","typeGuard":null,"tryCatchPattern":"try {\n    adminClient.updateLogLevel(logName, logLevel);\n} catch (NacosApiException e) {\n    if (e.getErrCode() == 10000 && e.getMessage().contains(\"Log name\")) {\n        // logName missing -> set it (e.g. \"com.alibaba.nacos\") and retry\n    } else { throw e; }\n}","preventionTips":["Always send logName (a registered SLF4J logger name).","Use \"com.alibaba.nacos\" as a safe root logger.","Keep logName + logLevel as a paired tuple in the client."],"tags":["logging","ops","validation","admin-api"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}