Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit f332e22

Browse files
Ne logger que les INFO et higher
1 parent 204fe23 commit f332e22

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Monolog/Handler/ProcessLogHandler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ protected function write(array $record): void
3434
if (null === $logFilename = ($this->logFilenames[$this->currentProcessCode] ?? null)) {
3535
return;
3636
}
37+
38+
if ($record['level'] < Logger::INFO) {
39+
return;
40+
}
41+
3742
if (null === $this->filesystem) {
3843
$this->filesystem = new Filesystem(
3944
new LocalFilesystemAdapter($this->logDir, null, \FILE_APPEND)

0 commit comments

Comments
 (0)