Skip to content
Merged
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ openclaw config set plugins.entries.agent-control-openclaw-plugin.config.userAge
# Remove optional keys
openclaw config unset plugins.entries.agent-control-openclaw-plugin.config.apiKey
openclaw config unset plugins.entries.agent-control-openclaw-plugin.config.logLevel
openclaw config unset plugins.entries.agent-control-openclaw-plugin.config.debug
openclaw config unset plugins.entries.agent-control-openclaw-plugin.config.agentId
openclaw config unset plugins.entries.agent-control-openclaw-plugin.config.agentVersion
openclaw config unset plugins.entries.agent-control-openclaw-plugin.config.userAgent
Expand All @@ -96,5 +95,3 @@ Set `config.logLevel` to:

- `info` for one-line lifecycle logs such as client init, warmup, and agent syncs
- `debug` for verbose startup, sync, and evaluation diagnostics

The older `config.debug` flag is still accepted as a deprecated alias for `logLevel=debug`.
7 changes: 0 additions & 7 deletions openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
"logLevel": {
"type": "string",
"enum": ["warn", "info", "debug"]
},
"debug": {
"type": "boolean"
}
}
},
Expand Down Expand Up @@ -67,10 +64,6 @@
"logLevel": {
"label": "Log Level",
"help": "Controls plugin verbosity: warn logs only warnings, errors, and block events; info adds high-level lifecycle logs; debug adds verbose diagnostics."
},
"debug": {
"label": "Debug Logging",
"help": "Deprecated alias for logLevel=debug."
}
}
}
3 changes: 0 additions & 3 deletions src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ export function resolveLogLevel(cfg: AgentControlPluginConfig): LogLevel {
if (configuredLevel && isLogLevel(configuredLevel)) {
return configuredLevel;
}
if (cfg.debug === true) {
return "debug";
}
return "warn";
}

Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export type AgentControlPluginConfig = {
userAgent?: string;
failClosed?: boolean;
logLevel?: LogLevel;
debug?: boolean;
};

export type AgentControlStep = {
Expand Down
6 changes: 3 additions & 3 deletions test/agent-control-plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ describe("agent-control plugin logging and blocking", () => {
expect(messages.some((message) => message.includes("evaluated agent="))).toBe(false);
});

it("emits verbose traces when the deprecated debug flag is enabled", async () => {
// Given the deprecated debug flag enabled in plugin configuration
it("emits verbose traces when debug log level is enabled", async () => {
// Given debug log level enabled in plugin configuration
const api = createMockApi({
serverUrl: "http://localhost:8000",
debug: true,
logLevel: "debug",
});

// When the plugin evaluates a tool call
Expand Down
22 changes: 0 additions & 22 deletions test/logging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,6 @@ describe("resolveLogLevel", () => {
expect(infoLevel).toBe("info");
expect(debugLevel).toBe("debug");
});

it("prefers logLevel over the deprecated debug flag", () => {
// Given both a logLevel value and the deprecated debug flag
const config = { logLevel: "warn", debug: true } as const;

// When the effective log level is resolved
const level = resolveLogLevel(config);

// Then the explicit logLevel takes precedence
expect(level).toBe("warn");
});

it("falls back to debug for deprecated compatibility", () => {
// Given an invalid logLevel alongside debug compatibility mode
const config = { logLevel: "verbose" as never, debug: true };

// When the effective log level is resolved
const level = resolveLogLevel(config);

// Then debug mode is used as the compatibility fallback
expect(level).toBe("debug");
});
});

describe("createPluginLogger", () => {
Expand Down
Loading