mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-08 06:06:40 +02:00
@@ -71,11 +71,11 @@ class GelfMessageFormatter extends NormalizerFormatter
|
|||||||
|
|
||||||
parent::__construct('U.u');
|
parent::__construct('U.u');
|
||||||
|
|
||||||
$this->systemName = (is_null($systemName) || $systemName === '') ? (string) gethostname() : $systemName;
|
$this->systemName = (null === $systemName || $systemName === '') ? (string) gethostname() : $systemName;
|
||||||
|
|
||||||
$this->extraPrefix = is_null($extraPrefix) ? '' : $extraPrefix;
|
$this->extraPrefix = null === $extraPrefix ? '' : $extraPrefix;
|
||||||
$this->contextPrefix = $contextPrefix;
|
$this->contextPrefix = $contextPrefix;
|
||||||
$this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength;
|
$this->maxLength = null === $maxLength ? self::DEFAULT_MAX_LENGTH : $maxLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -57,7 +57,7 @@ class PsrLogMessageProcessor implements ProcessorInterface
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
|
if (null === $val || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
|
||||||
$replacements[$placeholder] = $val;
|
$replacements[$placeholder] = $val;
|
||||||
} elseif ($val instanceof \DateTimeInterface) {
|
} elseif ($val instanceof \DateTimeInterface) {
|
||||||
if (null === $this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) {
|
if (null === $this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) {
|
||||||
|
Reference in New Issue
Block a user