1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 04:37:38 +02:00

Use ISO 8601 date constant

This commit is contained in:
Avtandil Kikabidze
2018-04-07 03:50:12 +04:00
parent 32563c49b7
commit 1e4b86d228

View File

@@ -11,6 +11,8 @@
namespace Monolog\Formatter;
use DateTime;
/**
* Format a log message into an ElasticSearch record
*
@@ -35,7 +37,7 @@ class ElasticSearchFormatter extends NormalizerFormatter
public function __construct($index, $type)
{
// ElasticSearch requires an ISO 8601 format date with optional millisecond precision.
parent::__construct('Y-m-d\TH:i:s.uP');
parent::__construct(DateTime::ISO8601);
$this->index = $index;
$this->type = $type;