mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 13:21:25 +00:00
chore: Fix type errors from reverts.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { inspect } from "node:util";
|
||||
import { Chalk } from "chalk";
|
||||
import type { Logger as TsLogger } from "tslog";
|
||||
import { CHAT_CHANNEL_ORDER } from "../channels/registry.js";
|
||||
@@ -320,9 +321,14 @@ export function runtimeForLogger(
|
||||
logger: SubsystemLogger,
|
||||
exit: RuntimeEnv["exit"] = defaultRuntime.exit,
|
||||
): RuntimeEnv {
|
||||
const formatArgs = (...args: unknown[]) =>
|
||||
args
|
||||
.map((arg) => (typeof arg === "string" ? arg : inspect(arg)))
|
||||
.join(" ")
|
||||
.trim();
|
||||
return {
|
||||
log: (message: string) => logger.info(message),
|
||||
error: (message: string) => logger.error(message),
|
||||
log: (...args: unknown[]) => logger.info(formatArgs(...args)),
|
||||
error: (...args: unknown[]) => logger.error(formatArgs(...args)),
|
||||
exit,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user