Dev Log Reader
Read logs/<env>.log relative to the project root to find relevant log entries for debugging.
The log file name matches the Mix environment: logs/dev.log, logs/test.log, logs/prod.log.
Commands
/dev-log— Show recent errors and warnings (default)/dev-log <search-term>— Search for specific term in logs/dev-log errors— Show only error-level entries/dev-log tail— Show the last 100 lines/dev-log clear— Delete the log file
Workflow
Determine what the user needs:
- No args or "errors": filter for
[error]and[warning]entries - A search term: grep for that term
- "tail": show recent entries
- "all": show errors, warnings, and notices
- "clear": delete
logs/dev.logusingrm logs/dev.logvia Bash, then confirm deletion
- No args or "errors": filter for
Read the log file using the appropriate approach:
- Use
Greptool with pattern matching againstlogs/dev.log(or the appropriate env log) - For tail: use
Readtool with offset onlogs/dev.log - Strip ANSI color codes mentally when analyzing — log lines are wrapped in
\e[31m(red/error),\e[33m(yellow/warning),\e[36m(cyan/debug),\e[22m(dim/info+notice)
- Use
Present findings concisely:
- Group by log level
- Show timestamps
- For errors: include surrounding context (2-3 lines before/after) using Grep
-Cparameter - Highlight actionable items (exceptions, crashes, failed tool executions)
- If the log is large (>5000 lines), focus on the most recent entries
Log Format
Standard Elixir Logger output:
HH:MM:SS.mmm [level] message
Levels in order of severity: debug, info, notice, warning, error
Key patterns to watch for:
[error] Tool execution exception— action/tool failure[error]with stacktraces — application crashes** (EXIT)or** (throw)— OTP process failures[warning]— degraded behaviorstatus=error— failed action executions with duration info