bpo-31080: Allowed logging.config.fileConfig() to accept both args an… · python/cpython@6ea56d2 (original) (raw)

Original file line number Diff line number Diff line change
@@ -715,7 +715,12 @@ a corresponding section in the configuration file.
715 715 The ``args`` entry, when :func:`eval`\ uated in the context of the ``logging``
716 716 package's namespace, is the list of arguments to the constructor for the handler
717 717 class. Refer to the constructors for the relevant handlers, or to the examples
718 -below, to see how typical entries are constructed.
718 +below, to see how typical entries are constructed. If not provided, it defaults
719 +to ``()``.
720 +
721 +The optional ``kwargs`` entry, when :func:`eval`\ uated in the context of the
722 +``logging`` package's namespace, is the keyword argument dict to the constructor
723 +for the handler class. If not provided, it defaults to ``{}``.
719 724
720 725 .. code-block:: ini
721 726
@@ -754,6 +759,7 @@ below, to see how typical entries are constructed.
754 759 level=WARN
755 760 formatter=form07
756 761 args=('localhost', 'from@abc', ['user1@abc', 'user2@xyz'], 'Logger Subject')
762 + kwargs={'timeout': 10.0}
757 763
758 764 [handler_hand08]
759 765 class=handlers.MemoryHandler
@@ -767,6 +773,7 @@ below, to see how typical entries are constructed.
767 773 level=NOTSET
768 774 formatter=form09
769 775 args=('localhost:9022', '/log', 'GET')
776 + kwargs={'secure': True}
770 777
771 778 Sections which specify formatter configuration are typified by the following.
772 779