diff options
| author | Steve Piercy <web@stevepiercy.com> | 2015-01-22 03:51:09 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2015-01-22 03:51:09 -0800 |
| commit | 11c6a51ad35da3e57a6434e16b94e66ccd109817 (patch) | |
| tree | bf34f4d4cb49a0dd2f6bf5fdb334ab1105a772db /docs | |
| parent | 6c867a84ed7d7a1307811fba0cf1e1575b9dbefb (diff) | |
| parent | 0e4dcf9f85babd94dcd9fc59513d257b4aba8d40 (diff) | |
| download | pyramid-11c6a51ad35da3e57a6434e16b94e66ccd109817.tar.gz pyramid-11c6a51ad35da3e57a6434e16b94e66ccd109817.tar.bz2 pyramid-11c6a51ad35da3e57a6434e16b94e66ccd109817.zip | |
Merge pull request #1540 from stevepiercy/master
fix master branch docs from "changing the response factory" breakage; use intersphinx mapping to python.org to prevent link rot
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/hooks.rst | 11 | ||||
| -rw-r--r-- | docs/narr/logging.rst | 18 |
2 files changed, 14 insertions, 15 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index 5bba0d143..17cae2c67 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -349,12 +349,6 @@ We attach and cache an object named ``extra`` to the ``request`` object. the property .. index:: - single: before render event - single: adding renderer globals - -.. _beforerender_event: - -.. index:: single: response factory .. _changing_the_response_factory: @@ -400,6 +394,11 @@ already constructed a :term:`configurator` it can also be registered via the config = Configurator() config.set_response_factory(lambda r: MyResponse()) +.. index:: + single: before render event + single: adding renderer globals + +.. _beforerender_event: Using The Before Render Event ----------------------------- diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst index c16673ae6..921883091 100644 --- a/docs/narr/logging.rst +++ b/docs/narr/logging.rst @@ -254,16 +254,15 @@ level unless they're explicitly set differently. Meaning the ``myapp.views``, ``myapp.models`` (and all your app's modules') loggers by default have an effective level of ``DEBUG`` too. -For more advanced filtering, the logging module provides a `Filter -<http://docs.python.org/lib/node423.html>`_ object; however it cannot be used -directly from the configuration file. +For more advanced filtering, the logging module provides a +:class:`logging.Filter` object; however it cannot be used directly from the +configuration file. -Advanced Configuration +Advanced Configuration ---------------------- -To capture log output to a separate file, use a `FileHandler -<http://docs.python.org/lib/node412.html>`_ (or a `RotatingFileHandler -<http://docs.python.org/lib/node413.html>`_): +To capture log output to a separate file, use :class:`logging.FileHandler` (or +:class:`logging.handlers.RotatingFileHandler`): .. code-block:: ini @@ -317,8 +316,9 @@ output, etc., but not web traffic. For web traffic logging Paste provides the :term:`middleware`. TransLogger produces logs in the `Apache Combined Log Format <http://httpd.apache.org/docs/2.2/logs.html#combined>`_. But TransLogger does not write to files, the Python logging system must be -configured to do this. The Python FileHandler_ logging handler can be used -alongside TransLogger to create an ``access.log`` file similar to Apache's. +configured to do this. The Python :class:`logging.FileHandler` logging +handler can be used alongside TransLogger to create an ``access.log`` file +similar to Apache's. Like any standard :term:`middleware` with a Paste entry point, TransLogger can be configured to wrap your application using ``.ini`` file syntax. First, |
