diff --git a/docs/book/formatters.md b/docs/book/formatters.md index af0bb8b5..ea1fb4cc 100644 --- a/docs/book/formatters.md +++ b/docs/book/formatters.md @@ -32,12 +32,18 @@ $logger->info('there'); // outputs "hello there" ``` -The constructor of `Laminas\Log\Formatter\Simple` accepts a single parameter: the -format string. This string contains keys surrounded by percent signs (e.g. -`%message%`). The format string may contain any key from the event data array. +The constructor of `Laminas\Log\Formatter\Simple` accepts two parameters: the +format string and the format for DateTime objects in event data. The format +string contains keys surrounded by percent signs (e.g. +`%message%`) and may contain any key from the event data array. You can retrieve the default keys by using the `DEFAULT_FORMAT` constant from `Laminas\Log\Formatter\Simple`. +The DateTime format string follows PHP's [DateTimeInterface::format](https://www.php.net/manual/en/datetime.format.php) +pattern and defaults to the format described in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). You can +retrieve the default DateTime format by using the +`DEFAULT_DATETIME_FORMAT` constant from `Laminas\Log\Formatter\FormatterInterface`. + ## Formatting to JSON `Laminas\Log\Formatter\Json` is the JSON formatter. By default, it