summaryrefslogtreecommitdiff
path: root/docs/narr/logging.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-08-22 02:16:55 -0400
committerChris McDonough <chrism@plope.com>2011-08-22 02:16:55 -0400
commit3d338ea5737b7c113b17120b40684e2694cf3fa9 (patch)
tree4bbca1ffb7dfcc1570c6c8d06884832b0be70237 /docs/narr/logging.rst
parent6413015a8f5f4de675016f33640b483bb0ecb56f (diff)
downloadpyramid-3d338ea5737b7c113b17120b40684e2694cf3fa9.tar.gz
pyramid-3d338ea5737b7c113b17120b40684e2694cf3fa9.tar.bz2
pyramid-3d338ea5737b7c113b17120b40684e2694cf3fa9.zip
- Use [app:main] instead of a pipeline in all scaffolds and tutorials
and narrative docs. - Break out awkward description of PasteDeploy entry points from project chapter into its own Paste chapter.
Diffstat (limited to 'docs/narr/logging.rst')
-rw-r--r--docs/narr/logging.rst26
1 files changed, 20 insertions, 6 deletions
diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst
index 375ab820c..8abcba3c7 100644
--- a/docs/narr/logging.rst
+++ b/docs/narr/logging.rst
@@ -301,22 +301,36 @@ requests using the `Apache Combined Log Format
with a FileHandler can be used to create an ``access.log`` file similar to
Apache's.
-Like any standard middleware with a Paste entry point, TransLogger can be
-configured to wrap your application in the ``[app:main]`` section of the ini
-file:
+Like any standard middleware with a Paste entry point, TransLogger can be
+configured to wrap your application using ``.ini`` file syntax. First,
+rename your Pyramid ``.ini`` file's ``[app:main]`` section to
+``[app:mypyramidapp]``, then add a ``[filter:translogger]`` section, then use
+a ``[pipeline:main]`` section file to form a WSGI pipeline with both the
+translogger and your application in it. For instance, change from this:
.. code-block:: ini
+ [app:main]
+ use = egg:MyProject
+
+To this:
+
+.. code-block:: ini
+
+ [app:mypyramidapp]
+ use = egg:MyProject
+
[filter:translogger]
paste.filter_app_factory = egg:Paste#translogger
setup_console_handler = False
[pipeline:main]
pipeline = translogger
- myapp
+ mypyramidapp
-This is equivalent to wrapping your app in a TransLogger instance via the
-bottom the ``main`` function of your project's ``__init__`` file:
+Using PasteDeploy this way to form and serve a pipeline is equivalent to
+wrapping your app in a TransLogger instance via the bottom the ``main``
+function of your project's ``__init__`` file:
.. code-block:: python