mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:28:27 +00:00
refactor(plugins): reuse plugin loader logger adapter
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createSubsystemLogger } from "../logging/subsystem.js";
|
||||
import { loadOpenClawPlugins, type PluginLoadOptions } from "./loader.js";
|
||||
import { createPluginLoaderLogger } from "./logger.js";
|
||||
import type { ProviderPlugin } from "./types.js";
|
||||
|
||||
const log = createSubsystemLogger("plugins");
|
||||
@@ -11,12 +12,7 @@ export function resolvePluginProviders(params: {
|
||||
const registry = loadOpenClawPlugins({
|
||||
config: params.config,
|
||||
workspaceDir: params.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 registry.providers.map((entry) => entry.provider);
|
||||
|
||||
Reference in New Issue
Block a user