File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function __invoke(LogIndexerMessage $logIndexerMessage): void
43
43
/** @var string $currentLine */
44
44
$ currentLine = $ file ->current ();
45
45
$ parsedLine = $ parser ->parse ($ currentLine );
46
- if (! empty ( $ parsedLine) && true === ($ parsedLine ['context ' ][self ::INDEX_LOG_RECORD ] ?? false )) {
46
+ if ([] !== $ parsedLine && true === ($ parsedLine ['context ' ][self ::INDEX_LOG_RECORD ] ?? false )) {
47
47
$ parameters [] = $ logIndexerMessage ->getProcessExecutionId ();
48
48
$ parameters [] = Logger::toMonologLevel ($ parsedLine ['level ' ]);
49
49
$ parameters [] = substr ((string ) $ parsedLine ['message ' ], 0 , 255 );
Original file line number Diff line number Diff line change 17
17
use League \Flysystem \FilesystemException ;
18
18
use League \Flysystem \Local \LocalFilesystemAdapter ;
19
19
use Monolog \Handler \AbstractProcessingHandler ;
20
- use Monolog \Logger ;
20
+ use Monolog \Level ;
21
+ use Monolog \LogRecord ;
21
22
22
23
class ProcessLogHandler extends AbstractProcessingHandler
23
24
{
@@ -35,13 +36,13 @@ public function __construct(private readonly string $processLogDir)
35
36
*
36
37
* @throws FilesystemException
37
38
*/
38
- protected function write (array $ record ): void
39
+ protected function write (array | LogRecord $ record ): void
39
40
{
40
41
if (null === $ logFilename = ($ this ->logFilenames [$ this ->currentProcessCode ] ?? null )) {
41
42
return ;
42
43
}
43
44
44
- if ($ record ['level ' ] < Logger:: INFO ) {
45
+ if ($ record ['level ' ] < Level::Info ) {
45
46
return ;
46
47
}
47
48
You can’t perform that action at this time.
0 commit comments