Skip to content

Commit

Permalink
[3.6] Add minimal logging config to the documentation (#4087) (#4088)
Browse files Browse the repository at this point in the history
* Add minimal logging config to the documentation

* Add blank line according to the linter rules

* Add CHANGES record
(cherry picked from commit 31ef9e1)

Co-authored-by: Alexey Dobrushskiy <a.dobrushskiy@gmail.com>
  • Loading branch information
asvetlov and AlexDobrushskiy committed Sep 24, 2019
1 parent 6348235 commit d006533
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/2469.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added minimal required logging configuration to logging documentation.
11 changes: 11 additions & 0 deletions docs/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,18 @@ page does not provide instructions for logging subscribing while the
most friendly method is :func:`logging.config.dictConfig` for
configuring whole loggers in your application.

Logging does not work out of the box. It requires at least minimal ``'logging'``
configuration.
Example of minimal working logger setup::

import logging
from aiohttp import web

app = web.Application()
logging.basicConfig(level=logging.DEBUG)
web.run_app(app, port=5000)

.. versionadded:: 4.0.0

Access logs
-----------
Expand Down

0 comments on commit d006533

Please sign in to comment.