-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
Add structured logging (JSON or logfmt) to make shellwright logs easier to read and filter.
Motivation
Currently logs are plain text. Structured logs would:
- Work with tools like pamburus/hl for colorized, human-readable output
- Enable filtering by log level, session ID, tool name, etc.
- Make debugging easier in production
Proposal
Start simple:
- Add a
--log-formatflag:text(default, current behavior) orjson - Include useful fields: timestamp, level, session_id, tool, message
- Keep the default human-friendly for basic use
Example JSON output:
{"ts":"2024-12-22T10:30:00Z","level":"info","tool":"shell_start","session":"abc123","msg":"Started bash session"}Users who want pretty logs can pipe through hl:
npm start 2>&1 | hlReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels