1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 19:00:20 +02:00

openlog never fails on php8.2 so remove check

This commit is contained in:
Jordi Boggiano
2023-06-20 15:48:29 +02:00
parent 521186e355
commit 50409b8169
2 changed files with 1 additions and 8 deletions

View File

@@ -50,11 +50,6 @@ parameters:
count: 1
path: src/Monolog/Handler/MandrillHandler.php
-
message: "#^Negated boolean expression is always false\\.$#"
count: 1
path: src/Monolog/Handler/SyslogHandler.php
-
message: "#^Variable property access on \\$this\\(Monolog\\\\LogRecord\\)\\.$#"
count: 4

View File

@@ -58,9 +58,7 @@ class SyslogHandler extends AbstractSyslogHandler
*/
protected function write(LogRecord $record): void
{
if (!openlog($this->ident, $this->logopts, $this->facility)) {
throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"' . Utils::getRecordMessageForException($record));
}
openlog($this->ident, $this->logopts, $this->facility);
syslog($this->toSyslogPriority($record->level), (string) $record->formatted);
}
}