From 2ce055b7f3e81b363d25925276fe7bbcad705be7 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Fri, 23 Nov 2018 23:59:14 -0600 Subject: Remove extra word --- docs/narr/logging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/narr/logging.rst') diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index 2acdb33f4..c0008282a 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -39,7 +39,7 @@ format `. This is the same format used as the Python :ref:`logging module's Configuration file format `. The application-related and logging-related sections in the configuration file can coexist peacefully, and the logging-related sections in the file are used -from when you run ``pserve``. +when you run ``pserve``. The ``pserve`` command calls the :func:`pyramid.paster.setup_logging` function, a thin wrapper around the :func:`logging.config.fileConfig` using the specified -- cgit v1.2.3 From 8a919fa0efb4448954c70cd1cba9e72f57008cf9 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 24 Nov 2018 00:03:17 -0600 Subject: Split long sentence --- docs/narr/logging.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/narr/logging.rst') diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index c0008282a..ad63b218f 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -37,9 +37,8 @@ These ``.ini`` file sections are passed to the `logging module's config file con PasteDeploy ``.ini`` files use the Python standard library :mod:`ConfigParser format `. This is the same format used as the Python :ref:`logging module's Configuration file format `. -The application-related and logging-related sections in the configuration file -can coexist peacefully, and the logging-related sections in the file are used -when you run ``pserve``. +The application-related and logging-related sections in the configuration file can coexist peacefully. +The logging-related sections in the file configure logging when you run ``pserve``. The ``pserve`` command calls the :func:`pyramid.paster.setup_logging` function, a thin wrapper around the :func:`logging.config.fileConfig` using the specified -- cgit v1.2.3 From 28d5c1c17f683a69345ddfe2a27b5c5aa2668d5a Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 24 Nov 2018 00:15:12 -0600 Subject: Improve sentence --- docs/narr/logging.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/narr/logging.rst') diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index ad63b218f..408c8fc7c 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -43,8 +43,8 @@ The logging-related sections in the file configure logging when you run ``pserve The ``pserve`` command calls the :func:`pyramid.paster.setup_logging` function, a thin wrapper around the :func:`logging.config.fileConfig` using the specified ``.ini`` file, if it contains a ``[loggers]`` section (all of the -cookiecutter-generated ``.ini`` files do). ``setup_logging`` reads the logging -configuration from the ini file upon which ``pserve`` was invoked. +cookiecutter-generated ``.ini`` files do). +``setup_logging`` reads the logging configuration from the ``ini`` file given on the ``pserve`` command line. Default logging configuration is provided in both the default ``development.ini`` and the ``production.ini`` files. If you use our cookiecutter to generate a Pyramid project with the name of the package as ``hello_world``, then the logging configuration -- cgit v1.2.3 From bc17531c1eb67f2a5eb31b966f2ede63d767b803 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 24 Nov 2018 00:59:35 -0600 Subject: Split long complicated sentence into 3 --- docs/narr/logging.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'docs/narr/logging.rst') diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index 408c8fc7c..b12434317 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -40,11 +40,10 @@ format `. This is the same format used as the Python The application-related and logging-related sections in the configuration file can coexist peacefully. The logging-related sections in the file configure logging when you run ``pserve``. -The ``pserve`` command calls the :func:`pyramid.paster.setup_logging` function, -a thin wrapper around the :func:`logging.config.fileConfig` using the specified -``.ini`` file, if it contains a ``[loggers]`` section (all of the -cookiecutter-generated ``.ini`` files do). -``setup_logging`` reads the logging configuration from the ``ini`` file given on the ``pserve`` command line. +On :ref:`startup ` the ``pserve`` command :ref:`configures logging ` using the ``.ini`` file given to it. +If the ``.ini`` file contains a ``[loggers]`` section (all of the cookiecutter-generated ``.ini`` files do) ``pserve`` calls the :func:`pyramid.paster.setup_logging` function. +The :func:`setup_logging` function is a thin wrapper around the :func:`logging.config.fileConfig`. +When ``setup_logging`` is passed the ``ini`` file given on the ``pserve`` command line it reads the file and configures logging. Default logging configuration is provided in both the default ``development.ini`` and the ``production.ini`` files. If you use our cookiecutter to generate a Pyramid project with the name of the package as ``hello_world``, then the logging configuration -- cgit v1.2.3 From 27c82826d669e4b381328643f84ccfff5bcba16e Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 24 Nov 2018 01:13:47 -0600 Subject: Add index entries for logging initialization --- docs/narr/logging.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/narr/logging.rst') diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index b12434317..8ae8469de 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -40,6 +40,9 @@ format `. This is the same format used as the Python The application-related and logging-related sections in the configuration file can coexist peacefully. The logging-related sections in the file configure logging when you run ``pserve``. +.. index:: + pair: logging; startup + On :ref:`startup ` the ``pserve`` command :ref:`configures logging ` using the ``.ini`` file given to it. If the ``.ini`` file contains a ``[loggers]`` section (all of the cookiecutter-generated ``.ini`` files do) ``pserve`` calls the :func:`pyramid.paster.setup_logging` function. The :func:`setup_logging` function is a thin wrapper around the :func:`logging.config.fileConfig`. -- cgit v1.2.3 From 6ca75ed314188de40a8676bf1258762bc9522b91 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sat, 24 Nov 2018 08:10:47 -0600 Subject: Use numbered list instead of a paragraph per Steve Piercy --- docs/narr/logging.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'docs/narr/logging.rst') diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index 8ae8469de..58bd2d4ec 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -43,10 +43,14 @@ The logging-related sections in the file configure logging when you run ``pserve .. index:: pair: logging; startup -On :ref:`startup ` the ``pserve`` command :ref:`configures logging ` using the ``.ini`` file given to it. -If the ``.ini`` file contains a ``[loggers]`` section (all of the cookiecutter-generated ``.ini`` files do) ``pserve`` calls the :func:`pyramid.paster.setup_logging` function. -The :func:`setup_logging` function is a thin wrapper around the :func:`logging.config.fileConfig`. -When ``setup_logging`` is passed the ``ini`` file given on the ``pserve`` command line it reads the file and configures logging. +If the configuration ``.ini`` file, specified when invoking ``pserve``, contains a ``[loggers]`` section then on :ref:`startup ` the following process takes place: + +#. The ``pserve`` command calls the :func:`pyramid.paster.setup_logging` function, passing the ``.ini`` file. + +#. ``setup_logging`` is a thin wrapper which calls the Python standard library's :func:`logging.config.fileConfig`. + +#. :func:`logging.config.fileConfig` reads the logging configuration from the ``.ini`` file and configures logging. + Default logging configuration is provided in both the default ``development.ini`` and the ``production.ini`` files. If you use our cookiecutter to generate a Pyramid project with the name of the package as ``hello_world``, then the logging configuration -- cgit v1.2.3