summaryrefslogtreecommitdiff
path: root/oauthlib/__init__.py
diff options
context:
space:
mode:
authorAbhishek Patel <abhidgreat8394@gmail.com>2019-04-21 12:09:00 -0700
committerAbhishek Patel <abhidgreat8394@gmail.com>2019-04-21 12:09:00 -0700
commit5ae97b984f9fe29717c125c205f79c87c6370613 (patch)
treedaabb9bde019b38cf9e3eaaa97714202c8d5cf17 /oauthlib/__init__.py
parent81a295de0d00abb37699b6ce6c75737a78b12458 (diff)
downloadoauthlib-5ae97b984f9fe29717c125c205f79c87c6370613.tar.gz
Add method to get/set debug flag
- By default debug mode is always off - Debug mode turned on automatically for tests - Complete requests sanitized in non debug mode
Diffstat (limited to 'oauthlib/__init__.py')
-rw-r--r--oauthlib/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/oauthlib/__init__.py b/oauthlib/__init__.py
index 8eb82a6..8639e88 100644
--- a/oauthlib/__init__.py
+++ b/oauthlib/__init__.py
@@ -15,3 +15,12 @@ __author__ = 'The OAuthlib Community'
__version__ = '3.0.2-dev'
logging.getLogger('oauthlib').addHandler(NullHandler())
+
+_DEBUG = False
+
+def set_debug(debug_val):
+ global _DEBUG
+ _DEBUG = debug_val
+
+def get_debug_flag():
+ return _DEBUG