summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordi Boggiano <j.boggiano@seld.be>2017-04-10 09:37:23 +0200
committerGitHub <noreply@github.com>2017-04-10 09:37:23 +0200
commit1b660bbbeedfa4681a2cabd84b6f852538036b29 (patch)
treef29e655580fb3f49e93fb03bce5c59acf35ff332 /src
parentfaed450d52d7e64ca26ce9023694e6c5e0f87bf4 (diff)
downloadmonolog-1b660bbbeedfa4681a2cabd84b6f852538036b29.zip
monolog-1b660bbbeedfa4681a2cabd84b6f852538036b29.tar.gz
monolog-1b660bbbeedfa4681a2cabd84b6f852538036b29.tar.bz2
Remove constant from constructor
Diffstat (limited to 'src')
-rw-r--r--src/Monolog/Formatter/GelfMessageFormatter.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Monolog/Formatter/GelfMessageFormatter.php b/src/Monolog/Formatter/GelfMessageFormatter.php
index bfdfcc0..2c1b0e8 100644
--- a/src/Monolog/Formatter/GelfMessageFormatter.php
+++ b/src/Monolog/Formatter/GelfMessageFormatter.php
@@ -58,7 +58,7 @@ class GelfMessageFormatter extends NormalizerFormatter
Logger::EMERGENCY => 0,
);
- public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = self::DEFAULT_MAX_LENGTH)
+ public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = null)
{
parent::__construct('U.u');
@@ -66,7 +66,7 @@ class GelfMessageFormatter extends NormalizerFormatter
$this->extraPrefix = $extraPrefix;
$this->contextPrefix = $contextPrefix;
- $this->maxLength = $maxLength;
+ $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength;
}
/**