summaryrefslogtreecommitdiff
path: root/oauthlib/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'oauthlib/__init__.py')
-rw-r--r--oauthlib/__init__.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/oauthlib/__init__.py b/oauthlib/__init__.py
index 089977c..f1457a9 100644
--- a/oauthlib/__init__.py
+++ b/oauthlib/__init__.py
@@ -15,3 +15,20 @@ __author__ = 'The OAuthlib Community'
__version__ = '3.0.2'
logging.getLogger('oauthlib').addHandler(NullHandler())
+
+_DEBUG = False
+
+def set_debug(debug_val):
+ """Set value of debug flag
+
+ :param debug_val: Value to set. Must be a bool value.
+ """
+ global _DEBUG
+ _DEBUG = debug_val
+
+def get_debug():
+ """Get debug mode value.
+
+ :return: `True` if debug mode is on, `False` otherwise
+ """
+ return _DEBUG