Add Monolog bridge for file-based job execution logging#199
Open
yann-eugone wants to merge 6 commits into1.xfrom
Open
Add Monolog bridge for file-based job execution logging#199yann-eugone wants to merge 6 commits into1.xfrom
yann-eugone wants to merge 6 commits into1.xfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #199 +/- ##
============================================
+ Coverage 99.32% 99.36% +0.03%
- Complexity 994 1054 +60
============================================
Files 172 175 +3
Lines 3114 3291 +177
============================================
+ Hits 3093 3270 +177
Misses 21 21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
halundraN
approved these changes
Apr 20, 2026
J-Ben87
approved these changes
Apr 20, 2026
Elkawaie
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
yokai/batch-monologpackage — a new bridge that writes job execution logs to files using Monolog'sStreamHandler, one file per job execution.loggingsection supportingmemory,null,stream(Monolog), andservicelogger types.New package:
yokai/batch-monologThe bridge exposes two classes:
StreamJobExecutionLoggerFactory— implementsJobExecutionLoggerFactoryInterface. Creates one log file per job execution, named after the job execution id. Supports optional Monolog processors and a custom formatter. Files can optionally be spread across nested subdirectories (similar to how Git stores objects), to keep individual directories manageable at scale.StreamJobExecutionLogger— implementsJobExecutionLoggerInterface. Wraps a MonologLoggerwith aStreamHandler. Reads logs back lazily viagetLogs()or as a full string viagetLogsContent(). ThegetReference()value stored with theJobExecutionis the path relative to the configured directory, making it portable across environments.Symfony bundle logging configuration
A new
loggingkey is added to the bundle configuration tree:When
type: streamis selected, the bundle wiresStreamJobExecutionLoggerFactoryautomatically.When
type: service, an arbitrary service id can be provided, allowing full customisation.Documentation
New RST pages:
core-concepts/job-execution-logger.rst— explains what a job execution logger is, the factory lifecycle (create/restore), and lists all available implementations.bridges/monolog.rst— usage examples for the three main scenarios: basic file logging, subdirectory sharding, and custom processors/formatter.Updated pages:
bridges/symfony-framework.rst— documents the newloggingbundle configuration.core-concepts/job-execution.rst— links to the new logger page.bridges.rstandindex.rst— add the new Monolog bridge to the navigation tree.