Skip to content

Commit

Permalink
Getting ready for 1.3.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Panos Garefalakis committed Nov 15, 2020
1 parent 26d8cb7 commit a2bda0e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,14 @@ using a method call:

.. code:: python
import logging
import time
from http_request_randomizer.requests.proxy.requestProxy import RequestProxy
if __name__ == '__main__':
start = time.time()
req_proxy = RequestProxy()
req_proxy = RequestProxy(log_level=logging.ERROR)
print("Initialization took: {0} sec".format((time.time() - start)))
print("Size: {0}".format(len(req_proxy.get_proxy_list())))
print("ALL = {0} ".format(list(map(lambda x: x.get_address(), req_proxy.get_proxy_list()))))
Expand All @@ -157,6 +158,17 @@ using a method call:
print("-> Going to sleep..")
time.sleep(10)
Changing log levels
~~~~~~~~~~~~~~~~~~~

The ``RequestProxy`` constructor accepts an optional parameter of
``log_level`` that can be used to change the level of logging. By
default, this is equal to 0, or NOTSET. The python logging levels are
documented
`here <https://docs.python.org/3/library/logging.html#logging-levels>`__.
You can either use integers or their equivalent constant in the logging
module. (e.g. ``logging.DEBUG``, ``logging.ERROR``, etc)

Documentation
-------------

Expand Down

0 comments on commit a2bda0e

Please sign in to comment.