Răsfoiți Sursa

Allow changing the date format after normalizer creation, fixes #1459

Jordi Boggiano 5 ani în urmă
părinte
comite
9fc7a8a810
1 a modificat fișierele cu 12 adăugiri și 0 ștergeri
  1. 12 0
      src/Monolog/Formatter/NormalizerFormatter.php

+ 12 - 0
src/Monolog/Formatter/NormalizerFormatter.php

@@ -65,6 +65,18 @@ class NormalizerFormatter implements FormatterInterface
         return $records;
     }
 
+    public function getDateFormat(): string
+    {
+        return $this->dateFormat;
+    }
+
+    public function setDateFormat(string $dateFormat): self
+    {
+        $this->dateFormat = $dateFormat;
+
+        return $this;
+    }
+
     /**
      * The maximum number of normalization levels to go through
      */