feat(thumbnails): log ffmpeg output on failure #16

Closed
gravityfargo wants to merge 1 commit from feat/1-ffmpeg-logging into main
Owner

Summary

Closes #1. ffmpeg's stderr was previously discarded silently — when video thumbnail generation failed, the resulting `ValueError` carried no diagnostic info.

  • Module-level logger (`athena_file.media.thumbnails`)
  • Non-zero return code raises `ValueError` with rc + stderr in the message AND emits an ERROR-level log line so callers with logging configured see the cause
  • DEBUG-level: stderr is also logged on success (gated by `logger.isEnabledFor` to avoid the decode cost when debug is off)
  • Inner `except ValueError: raise` lets our explicit failure pass through cleanly instead of getting double-wrapped by the catch-all

Verification

  • 247 tests pass
  • `make mypy` clean
  • `make lint` unchanged from main (33 pre-existing TC errors)
## Summary Closes #1. ffmpeg's stderr was previously discarded silently — when video thumbnail generation failed, the resulting \`ValueError\` carried no diagnostic info. - Module-level logger (\`athena_file.media.thumbnails\`) - Non-zero return code raises \`ValueError\` with rc + stderr in the message AND emits an ERROR-level log line so callers with logging configured see the cause - DEBUG-level: stderr is also logged on success (gated by \`logger.isEnabledFor\` to avoid the decode cost when debug is off) - Inner \`except ValueError: raise\` lets our explicit failure pass through cleanly instead of getting double-wrapped by the catch-all ## Verification - 247 tests pass - \`make mypy\` clean - \`make lint\` unchanged from main (33 pre-existing TC errors)
feat(thumbnails): log ffmpeg output on failure (#1)
Some checks failed
Run pytest tests / test (pull_request) Failing after 1m24s
7b50812ee1
Closes #1. ffmpeg's stderr was discarded silently. Now:

- module-level logger (athena_file.media.thumbnails)
- non-zero rc raises ValueError with rc + stderr in the message AND
  emits an ERROR-level log line so callers configured with logging
  see the cause
- DEBUG-level: stderr always logged on success too (gated by
  logger.isEnabledFor to avoid the decode cost when debug is off)
gravityfargo closed this pull request 2026-05-03 17:33:14 +00:00
Some checks failed
Run pytest tests / test (pull_request) Failing after 1m24s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ModernLeft/athena-file!16
No description provided.