diff options
| author | Michael Merickel <michael@merickel.org> | 2015-10-21 16:57:52 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2015-10-21 16:57:52 -0500 |
| commit | adb9377a963d7fdc7b7bf616740fb5dd2e40b2bf (patch) | |
| tree | 1038d03a21148607c79f740f0b32b147929251bf /docs/quick_tutorial/logging.rst | |
| parent | 452fdbef94bb29560497ec8a9ccbc3b9c2ecd2dd (diff) | |
| parent | d4221720b8409eafb65b301562be327af0196c7e (diff) | |
| download | pyramid-adb9377a963d7fdc7b7bf616740fb5dd2e40b2bf.tar.gz pyramid-adb9377a963d7fdc7b7bf616740fb5dd2e40b2bf.tar.bz2 pyramid-adb9377a963d7fdc7b7bf616740fb5dd2e40b2bf.zip | |
Merge branch 'master' into feature/alchemy-scaffold-update
Diffstat (limited to 'docs/quick_tutorial/logging.rst')
| -rw-r--r-- | docs/quick_tutorial/logging.rst | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/docs/quick_tutorial/logging.rst b/docs/quick_tutorial/logging.rst index e07d23d6d..5d29cd196 100644 --- a/docs/quick_tutorial/logging.rst +++ b/docs/quick_tutorial/logging.rst @@ -16,9 +16,9 @@ we might need to detect problems when other people use the site. We need *logging*. Fortunately Pyramid uses the normal Python approach to logging. The -scaffold generated, in your ``development.ini``, has a number of lines that +scaffold generated in your ``development.ini`` has a number of lines that configure the logging for you to some reasonable defaults. You then see -messages sent by Pyramid (for example, when a new request comes in.) +messages sent by Pyramid, for example, when a new request comes in. Objectives ========== @@ -42,6 +42,12 @@ Steps .. literalinclude:: logging/tutorial/views.py :linenos: +#. Finally let's edit ``development.ini`` configuration file + to enable logging for our Pyramid application: + + .. literalinclude:: logging/development.ini + :language: ini + #. Make sure the tests still pass: .. code-block:: bash @@ -61,15 +67,10 @@ Steps Analysis ======== -Our ``development.ini`` configuration file wires up Python standard -logging for our Pyramid application: - -.. literalinclude:: logging/development.ini - :language: ini - -In this, our ``tutorial`` Python package is setup as a logger -and configured to log messages at a ``DEBUG`` or higher level. When you -visit http://localhost:6543 your console will now show:: +In our configuration file ``development.ini``, our ``tutorial`` Python +package is setup as a logger and configured to log messages at a +``DEBUG`` or higher level. When you visit http://localhost:6543 your +console will now show:: 2013-08-09 10:42:42,968 DEBUG [tutorial.views][MainThread] In home view |
