Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Side by Side Diff: Doc/library/logging.config.rst

Issue 18759: Fix internal doc references for logging package (Closed)
Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/howto/logging.rst ('k') | Doc/library/logging.handlers.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`logging.config` --- Logging configuration 1 :mod:`logging.config` --- Logging configuration
2 =============================================== 2 ===============================================
3 3
4 .. module:: logging.config 4 .. module:: logging.config
5 :synopsis: Configuration of the logging module. 5 :synopsis: Configuration of the logging module.
6 6
7 7
8 .. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com> 8 .. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
9 .. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com> 9 .. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 Reads the logging configuration from a :mod:`configparser`\-format file. 79 Reads the logging configuration from a :mod:`configparser`\-format file.
80 This function can be called several times from an application, allowing an 80 This function can be called several times from an application, allowing an
81 end user to select from various pre-canned configurations (if the developer 81 end user to select from various pre-canned configurations (if the developer
82 provides a mechanism to present the choices and load the chosen 82 provides a mechanism to present the choices and load the chosen
83 configuration). 83 configuration).
84 84
85 :param fname: A filename, or a file-like object, or an instance derived 85 :param fname: A filename, or a file-like object, or an instance derived
86 from :class:`~configparser.RawConfigParser`. If a 86 from :class:`~configparser.RawConfigParser`. If a
87 ``RawConfigParser``-derived instance is passed, it is used as 87 ``RawConfigParser``-derived instance is passed, it is used as
88 is. Otherwise, a :class:`~configparser.Configparser` is 88 is. Otherwise, a :class:`~configparser.ConfigParser` is
89 instantiated, and the configuration read by it from the 89 instantiated, and the configuration read by it from the
90 object passed in ``fname``. If that has a :meth:`readline` 90 object passed in ``fname``. If that has a
91 :meth:`~io.TextIOBase.readline`
91 method, it is assumed to be a file-like object and read using 92 method, it is assumed to be a file-like object and read using
92 :meth:`~configparser.ConfigParser.read_file`; otherwise, 93 :meth:`~configparser.ConfigParser.read_file`; otherwise,
93 it is assumed to be a filename and passed to 94 it is assumed to be a filename and passed to
94 :meth:`~configparser.ConfigParser.read`. 95 :meth:`~configparser.ConfigParser.read`.
95 96
96 97
97 :param defaults: Defaults to be passed to the ConfigParser can be specified 98 :param defaults: Defaults to be passed to the ConfigParser can be specified
98 in this argument. 99 in this argument.
99 100
100 :param disable_existing_loggers: If specified as ``False``, loggers which 101 :param disable_existing_loggers: If specified as ``False``, loggers which
(...skipping 14 matching lines...) Expand all
115 * Use of a configuration read from a file, and then modified by the using 116 * Use of a configuration read from a file, and then modified by the using
116 application (e.g. based on command-line parameters or other aspects 117 application (e.g. based on command-line parameters or other aspects
117 of the runtime environment) before being passed to ``fileConfig``. 118 of the runtime environment) before being passed to ``fileConfig``.
118 119
119 .. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None) 120 .. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT, verify=None)
120 121
121 Starts up a socket server on the specified port, and listens for new 122 Starts up a socket server on the specified port, and listens for new
122 configurations. If no port is specified, the module's default 123 configurations. If no port is specified, the module's default
123 :const:`DEFAULT_LOGGING_CONFIG_PORT` is used. Logging configurations will be 124 :const:`DEFAULT_LOGGING_CONFIG_PORT` is used. Logging configurations will be
124 sent as a file suitable for processing by :func:`fileConfig`. Returns a 125 sent as a file suitable for processing by :func:`fileConfig`. Returns a
125 :class:`Thread` instance on which you can call :meth:`start` to start the 126 :class:`~threading.Thread` instance on which you can call
126 server, and which you can :meth:`join` when appropriate. To stop the server, 127 :meth:`~threading.Thread.start` to start the server, and which you can
128 :meth:`~threading.Thread.join` when appropriate. To stop the server,
127 call :func:`stopListening`. 129 call :func:`stopListening`.
128 130
129 The ``verify`` argument, if specified, should be a callable which should 131 The ``verify`` argument, if specified, should be a callable which should
130 verify whether bytes received across the socket are valid and should be 132 verify whether bytes received across the socket are valid and should be
131 processed. This could be done by encrypting and/or signing what is sent 133 processed. This could be done by encrypting and/or signing what is sent
132 across the socket, such that the ``verify`` callable can perform 134 across the socket, such that the ``verify`` callable can perform
133 signature verification and/or decryption. The ``verify`` callable is called 135 signature verification and/or decryption. The ``verify`` callable is called
134 with a single argument - the bytes received across the socket - and should 136 with a single argument - the bytes received across the socket - and should
135 return the bytes to be processed, or None to indicate that the bytes should 137 return the bytes to be processed, or None to indicate that the bytes should
136 be discarded. The returned bytes could be the same as the passed in bytes 138 be discarded. The returned bytes could be the same as the passed in bytes
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 The ``format`` entry is the overall format string, and the ``datefmt`` entry is 736 The ``format`` entry is the overall format string, and the ``datefmt`` entry is
735 the :func:`strftime`\ -compatible date/time format string. If empty, the 737 the :func:`strftime`\ -compatible date/time format string. If empty, the
736 package substitutes ISO8601 format date/times, which is almost equivalent to 738 package substitutes ISO8601 format date/times, which is almost equivalent to
737 specifying the date format string ``'%Y-%m-%d %H:%M:%S'``. The ISO8601 format 739 specifying the date format string ``'%Y-%m-%d %H:%M:%S'``. The ISO8601 format
738 also specifies milliseconds, which are appended to the result of using the above 740 also specifies milliseconds, which are appended to the result of using the above
739 format string, with a comma separator. An example time in ISO8601 format is 741 format string, with a comma separator. An example time in ISO8601 format is
740 ``2003-01-23 00:29:50,411``. 742 ``2003-01-23 00:29:50,411``.
741 743
742 The ``class`` entry is optional. It indicates the name of the formatter's class 744 The ``class`` entry is optional. It indicates the name of the formatter's class
743 (as a dotted module and class name.) This option is useful for instantiating a 745 (as a dotted module and class name.) This option is useful for instantiating a
744 :class:`Formatter` subclass. Subclasses of :class:`Formatter` can present 746 :class:`~logging.Formatter` subclass. Subclasses of :class:`~logging.Formatter`
745 exception tracebacks in an expanded or condensed format. 747 can present exception tracebacks in an expanded or condensed format.
746 748
747 .. note:: Due to the use of :func:`eval` as described above, there are 749 .. note:: Due to the use of :func:`eval` as described above, there are
748 potential security risks which result from using the :func:`listen` to send 750 potential security risks which result from using the :func:`listen` to send
749 and receive configurations via sockets. The risks are limited to where 751 and receive configurations via sockets. The risks are limited to where
750 multiple users with no mutual trust run code on the same machine; see the 752 multiple users with no mutual trust run code on the same machine; see the
751 :func:`listen` documentation for more information. 753 :func:`listen` documentation for more information.
752 754
753 .. seealso:: 755 .. seealso::
754 756
755 Module :mod:`logging` 757 Module :mod:`logging`
756 API reference for the logging module. 758 API reference for the logging module.
757 759
758 Module :mod:`logging.handlers` 760 Module :mod:`logging.handlers`
759 Useful handlers included with the logging module. 761 Useful handlers included with the logging module.
760 762
761 763
OLDNEW
« no previous file with comments | « Doc/howto/logging.rst ('k') | Doc/library/logging.handlers.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+