Quellcode durchsuchen

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

Jordi Boggiano vor 5 Jahren
Ursprung
Commit
9fc7a8a810
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
  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;
         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
      * The maximum number of normalization levels to go through
      */
      */