#9478 refactor: Consolidate logs CLI logic into JobLoggingService
Pull request opened by
edgarrmondragon
## Description
## Related Issues
• Closes #XXXX
## Summary by Sourcery
Refactor the logs CLI commands to delegate log retrieval, formatting, and file operations to a centralized JobLoggingService and introduce a shared database session helper.
Enhancements:
• Extract log-tail, job query, metadata formatting, and file reading logic into a new JobLoggingService class
• Refactor
meltano logs list
and
meltano logs show
commands to use JobLoggingService methods for fetching recent jobs and reading job logs
• Introduce a
_cli_db_session
helper to manage database sessions consistently across CLI commands
• Replace inline state mapping with pattern matching for job status display
meltano/meltano