fix(logging): cap file logs with configurable maxFileBytes

Co-authored-by: Xinhua Gu <562450+xinhuagu@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-02-22 17:58:51 +01:00
parent 795db98f6a
commit 8cc744ef1f
7 changed files with 154 additions and 3 deletions

View File

@@ -142,6 +142,8 @@ export type SessionMaintenanceConfig = {
export type LoggingConfig = {
level?: "silent" | "fatal" | "error" | "warn" | "info" | "debug" | "trace";
file?: string;
/** Maximum size of a single log file in bytes before writes are suppressed. Default: 500 MB. */
maxFileBytes?: number;
consoleLevel?: "silent" | "fatal" | "error" | "warn" | "info" | "debug" | "trace";
consoleStyle?: "pretty" | "compact" | "json";
/** Redact sensitive tokens in tool summaries. Default: "tools". */