alibaba/nacos · warning · NacosApiException

10000

10000

Error message

Log name is required.

What it means

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).

Source

Thrown at core/src/main/java/com/alibaba/nacos/core/model/request/LogUpdateRequest.java:54

        return logName;
    }
    
    public void setLogName(String logName) {
        this.logName = logName;
    }
    
    public String getLogLevel() {
        return logLevel;
    }
    
    public void setLogLevel(String logLevel) {
        this.logLevel = logLevel;
    }
    
    @Override
    public void validate() throws NacosApiException {
        if (StringUtils.isBlank(logName)) {
            throw new NacosApiException(NacosApiException.INVALID_PARAM,
                ErrorCode.PARAMETER_MISSING,
                "Log name is required.");
        }
        if (StringUtils.isBlank(logLevel)) {
            throw new NacosApiException(NacosApiException.INVALID_PARAM,
                ErrorCode.PARAMETER_MISSING,
                "Log level is required.");
        }
    }
}

View on GitHub (pinned to 9b989acdf1)

Solutions

  1. Send both logName and logLevel in the body.
  2. Use an exact registered logger name (inspect nacos logs or Loggers registry).
  3. Use "com.alibaba.nacos" as a safe root logger name.

Example fix

// before
PUT /v3/admin/core/ops/log
{"logLevel":"DEBUG"}
// after
{"logName":"com.alibaba.nacos","logLevel":"DEBUG"}
Defensive patterns

Strategy: validation

Validate before calling

if (logName == null || logName.isBlank()) {
    throw new IllegalArgumentException("logName is required");
}
// then PUT /v3/admin/core/ops/log {"logName":logName,"logLevel":logLevel}

Try / catch

try {
    adminClient.updateLogLevel(logName, logLevel);
} catch (NacosApiException e) {
    if (e.getErrCode() == 10000 && e.getMessage().contains("Log name")) {
        // logName missing -> set it (e.g. "com.alibaba.nacos") and retry
    } else { throw e; }
}

Prevention

When it happens

Trigger: PUT /v3/admin/core/ops/log with a JSON body missing "logName" or with an empty string, e.g. {"logLevel":"DEBUG"}.

Common situations: Client sends only the level; wrong JSON key (e.g. "loggerName"); trying to target a logger name that is not registered on the server.

Related errors


AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14). Data as JSON: /api/errors/7e9dc6489d0bb5ea. Report an issue: GitHub.