mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-29 20:25:02 +00:00
refactor(plugins): reuse plugin loader logger adapter
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user