diff options
| author | Michael Merickel <michael@merickel.org> | 2012-07-25 14:02:10 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2012-07-25 14:02:10 -0500 |
| commit | 14f9fe44ec75c055d89374a7852e1ca2af0ff31c (patch) | |
| tree | 8027ef04a07bd0c01f60d347d8fca2ec4d8acc7c /docs | |
| parent | 5b2104876668910614d8f96802406030bd4d5272 (diff) | |
| download | pyramid-14f9fe44ec75c055d89374a7852e1ca2af0ff31c.tar.gz pyramid-14f9fe44ec75c055d89374a7852e1ca2af0ff31c.tar.bz2 pyramid-14f9fe44ec75c055d89374a7852e1ca2af0ff31c.zip | |
add logging call to wsgi setup
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tutorials/modwsgi/index.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/tutorials/modwsgi/index.rst b/docs/tutorials/modwsgi/index.rst index e070f8eda..d11167344 100644 --- a/docs/tutorials/modwsgi/index.rst +++ b/docs/tutorials/modwsgi/index.rst @@ -73,9 +73,10 @@ commands and files. .. code-block:: python - from pyramid.paster import get_app - application = get_app( - '/Users/chrism/modwsgi/env/myapp/production.ini', 'main') + from pyramid.paster import get_app, setup_logging + ini_path = '/Users/chrism/modwsgi/env/myapp/production.ini' + setup_logging(ini_path) + application = get_app(ini_path, 'main') The first argument to ``get_app`` is the project configuration file name. It's best to use the ``production.ini`` file provided by your @@ -85,6 +86,10 @@ commands and files. ``application`` is important: mod_wsgi requires finding such an assignment when it opens the file. + The call to ``setup_logging`` initializes the standard library's + `logging` module to allow logging within your application. + See :ref:`logging_config`. + #. Make the ``pyramid.wsgi`` script executable. .. code-block:: text |
