it("uses daily rolling default log file and prunes old ones", () => {
resetLogger();
setLoggerOverride({ level: "info" }); // force default file path with enabled file logging const today = localDateString(new Date()); const todayPath = path.join(DEFAULT_LOG_DIR, `openclaw-${today}.log`);
// create an old file to be pruned const oldPath = path.join(DEFAULT_LOG_DIR, "openclaw-2000-01-01.log");
fs.mkdirSync(DEFAULT_LOG_DIR, { recursive: true });
fs.writeFileSync(oldPath, "old");
fs.utimesSync(oldPath, new Date(0), new Date(0));
fs.rmSync(todayPath, { force: true });
it("keeps messages that do not start with the subsystem", () => {
expect(stripRedundantSubsystemPrefixForConsole("discordant: hello", "discord")).toBe( "discordant: hello",
);
});
});
function localDateString(date: Date) { const year = date.getFullYear(); const month = String(date.getMonth() + 1).padStart(2, "0"); const day = String(date.getDate()).padStart(2, "0"); return `${year}-${month}-${day}`;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.