Skip to content

Commit 36bc912

Browse files
committed
DOC indent additional docs for configure_logging
1 parent a611f8d commit 36bc912

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

docs/topics/logging.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -196,30 +196,30 @@ scrapy.utils.log module
196196

197197
.. autofunction:: configure_logging
198198

199-
``configure_logging`` is automatically called when using Scrapy commands,
200-
but needs to be called explicitly when running custom scripts. In that
201-
case, its usage is not required but it's recommended.
202-
203-
If you plan on configuring the handlers yourself is still recommended you
204-
call this function, passing `install_root_handler=False`. Bear in mind
205-
there won't be any log output set by default in that case.
206-
207-
To get you started on manually configuring logging's output, you can use
208-
`logging.basicConfig()`_ to set a basic root handler. This is an example on
209-
how to redirect ``INFO`` or higher messages to a file::
210-
211-
import logging
212-
from scrapy.utils.log import configure_logging
213-
214-
configure_logging(install_root_handler=False)
215-
logging.basicConfig(
216-
filename='log.txt',
217-
format='%(levelname)s: %(message)s',
218-
level=logging.INFO
219-
)
220-
221-
Refer to :ref:`run-from-script` for more details about using Scrapy this
222-
way.
199+
``configure_logging`` is automatically called when using Scrapy commands,
200+
but needs to be called explicitly when running custom scripts. In that
201+
case, its usage is not required but it's recommended.
202+
203+
If you plan on configuring the handlers yourself is still recommended you
204+
call this function, passing `install_root_handler=False`. Bear in mind
205+
there won't be any log output set by default in that case.
206+
207+
To get you started on manually configuring logging's output, you can use
208+
`logging.basicConfig()`_ to set a basic root handler. This is an example
209+
on how to redirect ``INFO`` or higher messages to a file::
210+
211+
import logging
212+
from scrapy.utils.log import configure_logging
213+
214+
configure_logging(install_root_handler=False)
215+
logging.basicConfig(
216+
filename='log.txt',
217+
format='%(levelname)s: %(message)s',
218+
level=logging.INFO
219+
)
220+
221+
Refer to :ref:`run-from-script` for more details about using Scrapy this
222+
way.
223223

224224
.. _logging.basicConfig(): https://docs.python.org/2/library/logging.html#logging.basicConfig
225225

0 commit comments

Comments
 (0)