mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 18:21:23 +00:00
perf(test): reduce vitest logging overhead and media fixture cost
This commit is contained in:
@@ -37,6 +37,9 @@ function normalizeConsoleLevel(level?: string): LogLevel {
|
||||
if (isVerbose()) {
|
||||
return "debug";
|
||||
}
|
||||
if (!level && process.env.VITEST === "true" && process.env.OPENCLAW_TEST_CONSOLE !== "1") {
|
||||
return "silent";
|
||||
}
|
||||
return normalizeLogLevel(level, "info");
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,9 @@ function resolveSettings(): ResolvedSettings {
|
||||
cfg = undefined;
|
||||
}
|
||||
}
|
||||
const level = normalizeLogLevel(cfg?.level, "info");
|
||||
const defaultLevel =
|
||||
process.env.VITEST === "true" && process.env.OPENCLAW_TEST_FILE_LOG !== "1" ? "silent" : "info";
|
||||
const level = normalizeLogLevel(cfg?.level, defaultLevel);
|
||||
const file = cfg?.file ?? defaultRollingPathForToday();
|
||||
return { level, file };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user