Skip to content

Commit b056092

Browse files
committed
The allowInlineLineBreaks setter method is not available in Monolog 1.10.0
1 parent 0ce21f3 commit b056092

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Helper/Logging/LoggingEnhancement.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@ protected function initializeFileLogger(InputInterface $input, OutputInterface $
5151
}
5252

5353
$fileHandler = new StreamHandler($this->getRuntimeConfig()->getLogFilename(true), $this->getRuntimeConfig()->getLogLevel());
54-
$formatter = new LineFormatter($this->getRuntimeConfig()->getFileLogLineFormat());
55-
$formatter->allowInlineLineBreaks($this->getRuntimeConfig()->getFileLogLineBreaks());
54+
$formatter = new LineFormatter(
55+
$this->getRuntimeConfig()->getFileLogLineFormat(),
56+
null,
57+
$this->getRuntimeConfig()->getFileLogLineBreaks()
58+
);
5659
$fileHandler->setFormatter($formatter);
5760
$this->logger->pushHandler($fileHandler);
5861
}
@@ -64,8 +67,11 @@ protected function initializeConsoleLogger(InputInterface $input, OutputInterfac
6467
if ($this->getRuntimeConfig()->isLogToConsole()) {
6568

6669
$consoleHandler = new ConsoleHandler($output, $this->getRuntimeConfig()->getLogLevel());
67-
$formatter = new LineFormatter($this->getRuntimeConfig()->getConsoleLogLineFormat());
68-
$formatter->allowInlineLineBreaks($this->getRuntimeConfig()->getConsoleLogLineBreaks());
70+
$formatter = new LineFormatter(
71+
$this->getRuntimeConfig()->getConsoleLogLineFormat(),
72+
null,
73+
$this->getRuntimeConfig()->getConsoleLogLineBreaks()
74+
);
6975
$consoleHandler->setFormatter($formatter);
7076
$this->logger->pushHandler($consoleHandler);
7177

0 commit comments

Comments
 (0)