rails_read_logs
Read recent Rails log entries with level filtering, search, and sensitive data redaction to debug errors and investigate failed requests.
Instructions
Read recent log entries with level filtering and sensitive data redaction. Use when: debugging errors, checking recent activity, investigating failed requests. Key params: lines (default 50), level (ERROR/WARN/INFO/DEBUG/FATAL/all), file, search. Search matches the redacted line, so a filtered value cannot be searched for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Log file name (e.g. 'production', 'sidekiq', or a rotated 'development.log.0'). Defaults to current Rails.env log. '.log' suffix optional. | |
| level | No | Minimum log level filter. 'all' shows everything (default). 'ERROR' shows ERROR+FATAL only. | |
| lines | No | Number of lines to tail from the log file. With `search`, the number of matching lines to show, searched for in the last 4 MB of the file. Default: 50, max: 500. | |
| search | No | Case-insensitive text filter. Only lines containing this string are returned, searched for in the last 4 MB of the file. |