-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Problem
When development and production Freshell servers run on the same machine, both write to the same default debug log path (~/.freshell/logs/server-debug.jsonl). This interleaves events from different runtime modes (env: development and env: production) and different ports in one stream.
Why this is bad
- Triage is error-prone: timeline analysis mixes unrelated processes
- Backpressure/perf investigations can draw incorrect conclusions
- Automated log parsing cannot reliably attribute events to an instance
Evidence
In a single file we observed:
- dev listener (
port: 3002) and prod listener (port: 3001) startup events - alternating perf samples and WS events tagged with different
envvalues
Expected
Each server instance should write to an isolated log stream by default (or include instance-specific file naming), so dev/prod and multi-instance runs are attributable without manual filtering.
Suggested fix
- Include mode and instance dimensions in log filename by default, e.g.
server-debug.<env>.<port-or-instanceId>.jsonl - Optionally include PID in filename
- Keep
LOG_DEBUG_PATHoverride behavior unchanged - Add a startup log line explicitly printing resolved log file path for that instance
Acceptance criteria
- Running dev and prod simultaneously produces separate debug files
- No interleaving between instances in default configuration
- Docs mention the per-instance log behavior and override controls
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels