File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Version 6.0.0
2+ * Add managing exceptions with a stream
3+
14# Version 5.5.0
25* Added cleanup commands
36* Updated for PHP 8.2
69* Fix File Exceptions integration
710
811# Version 5.4.0
9- * Add possibility to save exceptions in file
12+ * Add the possibility to save exceptions in the file
1013
1114# Version 5.3.1
1215* Fix interface naming
Original file line number Diff line number Diff line change 1515use CodeRhapsodie \DataflowBundle \Logger \DelegatingLogger ;
1616use CodeRhapsodie \DataflowBundle \Registry \DataflowTypeRegistryInterface ;
1717use CodeRhapsodie \DataflowBundle \Repository \JobRepository ;
18- use Monolog \Formatter \JsonFormatter ;
18+ use Monolog \Formatter \LineFormatter ;
1919use Monolog \Handler \StreamHandler ;
2020use Monolog \Logger ;
2121use Psr \Log \LoggerAwareInterface ;
2424
2525class JobProcessor implements JobProcessorInterface, LoggerAwareInterface
2626{
27+ private const FORMAT = "[%datetime%] %level_name% when processing item %context.index%: %message% %context% %extra% \n" ;
28+
2729 use LoggerAwareTrait;
2830
2931 public function __construct (
@@ -45,7 +47,7 @@ public function process(Job $job): void
4547 }
4648
4749 $ handler = new StreamHandler (tempnam (sys_get_temp_dir (), 'dataflow_ ' ));
48- $ handler ->setFormatter (new JsonFormatter (appendNewline: false ));
50+ $ handler ->setFormatter (new LineFormatter ( self :: FORMAT ));
4951
5052 $ loggers = [new Logger ('dataflow_internal ' , [$ bufferHandler = $ handler ])];
5153 if (isset ($ this ->logger )) {
You can’t perform that action at this time.
0 commit comments