mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +02:00
Preserved typing for float and integers values
Related #831 Logs stored in a ELK-based solution need to keep the value typing, especially with float vs integer types. Adding `JSON_NUMERIC_CHECK` and `JSON_PRESERVE_ZERO_FRACTION` allow to avoid issue.
This commit is contained in:
committed by
GitHub
parent
07b6c1c417
commit
19d72693c8
@@ -196,7 +196,7 @@ class NormalizerFormatter implements FormatterInterface
|
||||
*/
|
||||
private function jsonEncode($data)
|
||||
{
|
||||
return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK | JSON_PRESERVE_ZERO_FRACTION);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user