refactor(plugins): reuse plugin loader logger adapter

This commit is contained in:
Peter Steinberger
2026-02-18 23:47:59 +00:00
parent a8ebe942aa
commit aa8f87a3bf
6 changed files with 47 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ import { resolveDefaultAgentWorkspaceDir } from "../agents/workspace.js";
import { loadConfig } from "../config/config.js";
import { createSubsystemLogger } from "../logging/subsystem.js";
import { loadOpenClawPlugins } from "./loader.js";
import { createPluginLoaderLogger } from "./logger.js";
import type { PluginRegistry } from "./registry.js";
export type PluginStatusReport = PluginRegistry & {
@@ -24,12 +25,7 @@ export function buildPluginStatusReport(params?: {
const registry = loadOpenClawPlugins({
config,
workspaceDir,
logger: {
info: (msg) => log.info(msg),
warn: (msg) => log.warn(msg),
error: (msg) => log.error(msg),
debug: (msg) => log.debug(msg),
},
logger: createPluginLoaderLogger(log),
});
return {