From e3862c45dbd70685fd6a52db1a9d39ddb3fa16b2 Mon Sep 17 00:00:00 2001 From: Alexey Dobrushskiy Date: Tue, 24 Sep 2019 12:23:32 +0300 Subject: [PATCH] [3.6] Add minimal logging config to the documentation (#4087) * Add minimal logging config to the documentation * Add blank line according to the linter rules * Add CHANGES record (cherry picked from commit 31ef9e13) Co-authored-by: Alexey Dobrushskiy --- CHANGES/2469.doc | 1 + docs/logging.rst | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 CHANGES/2469.doc diff --git a/CHANGES/2469.doc b/CHANGES/2469.doc new file mode 100644 index 00000000000..f1040ca4d3c --- /dev/null +++ b/CHANGES/2469.doc @@ -0,0 +1 @@ +Added minimal required logging configuration to logging documentation. diff --git a/docs/logging.rst b/docs/logging.rst index f8b998b7016..916a7feff67 100644 --- a/docs/logging.rst +++ b/docs/logging.rst @@ -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 -----------