diff --git a/sublime_evernote.py b/sublime_evernote.py index cae9d48..29ef900 100644 --- a/sublime_evernote.py +++ b/sublime_evernote.py @@ -42,14 +42,12 @@ SUBLIME_EVERNOTE_COMMENT_BEG = "" -DEBUG = True +DEBUG = False -if DEBUG: - def LOG(*args): + +def LOG(*args): + if DEBUG: print("Evernote:", *args) -else: - def LOG(*args): - pass def extractTags(tags): @@ -231,7 +229,9 @@ def get_user_id(self, token=None): return int(id, 16) def load_settings(self): + global DEBUG self.settings = sublime.load_settings(EVERNOTE_SETTINGS) + DEBUG = bool(self.settings.get('debug')) pygm_style = self.settings.get('code_highlighting_style') if pygm_style: EvernoteDo.MD_EXTRAS['fenced-code-blocks']['style'] = pygm_style