@@ -554,6 +554,29 @@ attribute ``baz`` set to ``'bozz'``.
554554 configuration machinery, but set as attribute values as-is.
555555
556556
557+ .. _handler-config-dict-order :
558+
559+ Handler configuration order
560+ """""""""""""""""""""""""""
561+
562+ Handlers are configured in alphabetical order of their keys, and a configured
563+ handler replaces the configuration dictionary in (a working copy of) the
564+ ``handlers `` dictionary in the schema. If you use a construct such as
565+ ``cfg://handlers.foo ``, then initially ``handlers['foo'] `` points to the
566+ configuration dictionary for the handler named ``foo ``, and later (once that
567+ handler has been configured) it points to the configured handler instance.
568+ Thus, ``cfg://handlers.foo `` could resolve to either a dictionary or a handler
569+ instance. In general, it is wise to name handlers in a way such that dependent
570+ handlers are configured _after_ any handlers they depend on; that allows
571+ something like ``cfg://handlers.foo `` to be used in configuring a handler that
572+ depends on handler ``foo ``. If that dependent handler were named ``bar ``,
573+ problems would result, because the configuration of ``bar `` would be attempted
574+ before that of ``foo ``, and ``foo `` would not yet have been configured.
575+ However, if the dependent handler were named ``foobar ``, it would be configured
576+ after ``foo ``, with the result that ``cfg://handlers.foo `` would resolve to
577+ configured handler ``foo ``, and not its configuration dictionary.
578+
579+
557580.. _logging-config-dict-externalobj :
558581
559582Access to external objects
0 commit comments