feat(common): configure file log level

Allow operators to control how much diagnostic information is retained in file logs independently from live console output.

Document the new startup setting and add regression coverage for its default behavior, runtime independence, and unsupported configurations.
This commit is contained in:
Werewolf-Wu authored and DrSmoothl committed 2026-07-30 10:04:52 +08:00
1 parent e5f256f4dc
commit 227a62f2ad
6 files changed
+236 -27

No files matched your search

+2 -2
View File
@@ -262,8 +262,8 @@ export class ApiHandler {
params: JsonObject,
sink?: StreamSink,
): Promise<import('./types').ApiResponse> {
// Terse breadcrumb to the log file (debug, always persisted): lets the
// operator grep "what did the bot get asked to do" in post-mortems.
// Terse breadcrumb to the log file (debug, which is written to disk under the default
// file level): lets the operator grep "what did the bot get asked to do" in post-mortems.
this.log.debug('%s params=%s', action, summarizeParams(params));
// Full request shape, memory-only (trace). Lazy producer → the deep render
// only runs when trace is live.