-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Size-based rotation for warp.log within a session (currently startup-only) #10879
Copy link
Copy link
Open
Labels
area:performanceGeneral application performance, responsiveness, and resource usage.General application performance, responsiveness, and resource usage.enhancementNew feature or request.New feature or request.ready-to-implementThe issue is ready for implementation work.The issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triage-reviewedtriagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.warp:auto-triage-review
Metadata
Metadata
Assignees
Labels
area:performanceGeneral application performance, responsiveness, and resource usage.General application performance, responsiveness, and resource usage.enhancementNew feature or request.New feature or request.ready-to-implementThe issue is ready for implementation work.The issue is ready for implementation work.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triage-reviewedtriagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.warp:auto-triage-review
Type
Fields
Give feedbackNo fields configured for issues without a type.
Pre-submit Checks
Describe the solution you'd like?
warp_logging::rotate_log_files()rotateswarp.logand its telemetry siblings once at app startup: the previous session's log becomes.old.0, older ones shift up to.old.N, and the oldest gets discarded. That model works well for users who restart Warp frequently — each session gets its own log file.For long-running sessions (developers who keep Warp open for days or weeks), the active
warp.loggrows unboundedly during a single session, with no checkpoints in between. The startup rotation never fires until the next restart.Proposal: add an in-session size-based rotation mode to
warp_logging, complementing the existing startup rotation. When the activewarp.logexceeds a configured size threshold mid-session, it's rotated to an in-session sibling (e.g.warp.log.in_session.N) and a fresh active file is opened. The startup.old.Nsemantics that log-bundle uploads and other UX depend on stay untouched.Is your feature request related to a problem? Please describe.
Two related reports for other log files exist:
simple_logger)simple_logger)Both of those operate on a different rotation engine than
warp.log, but the underlying user complaint is the same: Warp's diagnostic data grows without bound during long sessions. Cappingwarp.logat e.g. 50 MiB × 5 rotated copies would bound it at ~300 MiB even across multi-day sessions, while preserving the per-session file boundary at startup that today's UX (e.g. log-bundle uploads) relies on.Additional context
This complements (does not replace) the MCP/LSP rotation work. Different file, different rotation engine, but the same principle: cap on-disk footprint during long sessions while preserving the current per-session semantics.
Sketch of the implementation surface:
LogConfigwith optionalmax_file_size_bytes(or equivalent threshold)warp.log.in_session.Nto distinguish from the existing startup.old.NfilesOperating system (OS)
macOS
How important is this feature to you?
3
Warp Internal (ignore) - linear-label:39cc6478-1249-4ee7-950b-c428edfeecd1
Ignore