|
|
@@ -115,6 +115,7 @@ class GelfMessageFormatter extends NormalizerFormatter
|
|
|
}
|
|
|
|
|
|
foreach ($extra as $key => $val) {
|
|
|
+ $key = (string) preg_replace('#[^\w\.\-]#', '-', $key);
|
|
|
$val = \is_scalar($val) || null === $val ? $val : $this->toJson($val);
|
|
|
$len = \strlen($this->extraPrefix . $key . $val);
|
|
|
if ($len > $this->maxLength) {
|
|
|
@@ -126,6 +127,7 @@ class GelfMessageFormatter extends NormalizerFormatter
|
|
|
}
|
|
|
|
|
|
foreach ($context as $key => $val) {
|
|
|
+ $key = (string) preg_replace('#[^\w\.\-]#', '-', $key);
|
|
|
$val = \is_scalar($val) || null === $val ? $val : $this->toJson($val);
|
|
|
$len = \strlen($this->contextPrefix . $key . $val);
|
|
|
if ($len > $this->maxLength) {
|