:ref:`logrecord-attributes`.
-.. class:: Formatter(fmt=None, datefmt=None, style='%')
+.. class:: Formatter(fmt=None, datefmt=None, style='%', validate=True)
Returns a new instance of the :class:`Formatter` class. The instance is
initialized with a format string for the message as a whole, as well as a
The *style* parameter can be one of '%', '{' or '$' and determines how
the format string will be merged with its data: using one of %-formatting,
- :meth:`str.format` or :class:`string.Template`. See :ref:`formatting-styles`
- for more information on using {- and $-formatting for log messages.
+ :meth:`str.format` or :class:`string.Template`. This only applies to the
+ format string *fmt* (e.g. ``'%(message)s'`` or ``{message}``), not to the
+ actual log messages passed to ``Logger.debug`` etc; see
+ :ref:`formatting-styles` for more information on using {- and $-formatting
+ for log messages.
.. versionchanged:: 3.2
The *style* parameter was added.