From 2e25d880310800ede57300b301e746a1b03d51a3 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 15 Nov 2014 20:31:36 +0000 Subject: [PATCH] Add debug config value. --- nextaction.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nextaction.py b/nextaction.py index 3f5001f..cdf9bd8 100755 --- a/nextaction.py +++ b/nextaction.py @@ -377,7 +377,11 @@ def DoSyncAndGetUpdated(items_to_sync, sync_state): def main(): - logging.basicConfig(level=logging.INFO) + if os.environ.get('TODOIST_DEBUG', None): + log_level = logging.DEBUG + else: + log_level = logging.INFO + logging.basicConfig(level=log_level) if not API_TOKEN: logging.error('No API key set, exiting...') sys.exit(1)