@@ -196,30 +196,30 @@ scrapy.utils.log module
196
196
197
197
.. autofunction :: configure_logging
198
198
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.
223
223
224
224
.. _logging.basicConfig() : https://docs.python.org/2/library/logging.html#logging.basicConfig
225
225
0 commit comments