Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (20 sloc) 759 Bytes

Logging in PRAW

Occasionally it is useful to observe the HTTP requests that PRAW is issuing. To do so you have to configure and enable logging.

To log everything available add the following to your code:

import logging

handler = logging.StreamHandler()
logger = logging.getLogger('prawcore')

When properly configured HTTP requests that are issued should produce output similar to the following:

Fetching: GET
Data: None
Params: {'raw_json': 1}
Response: 200 (876 bytes)

For more information on logging, see :py:class:`logging.Logger`.

You can’t perform that action at this time.