Loading
Add comments to explain TaskLogger#tail options
What does this MR do and why?
Adds doc comments to TaskLogger#tail explaining each keyword argument, as suggested in !4855 (comment 2512911293):
max_lines: caps the output and adds an "N lines omitted" notice with the path to the full log.exclude_gems: drops lines containing/ruby/gems/before the line cap, so gem backtraces don't crowd out application errors.only_with_errors: returnsnilwhen the log has no error-looking lines, so successful tasks produce no output.smart_filter: selects lines by score (errors, warnings, and their neighbours) instead of taking the last N lines.
Also documents the return value (String, or nil when only_with_errors finds no errors). No behaviour change.
Closes #2677 (closed)
MR acceptance checklist
- This MR has been reviewed against the MR acceptance checklist.
- This contribution was prepared with the help of an AI assistant. I reviewed the changes and take responsibility for them.