def set(self, mode, disable):
global logger<EOL>try:<EOL><INDENT>if logger:<EOL><INDENT>if disable:<EOL><INDENT>logger.disabled = True<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if mode in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>logger = logd.getLogger(mode, __version__)<EOL><DEDENT><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>logger.exception(<EOL>'<STR_LIT>' % inspect.stack()[<NUM_LIT:0>][<NUM_LIT:3>]<EOL>)<EOL>return False<EOL><DEDENT>return True<EOL>
create logger object, enable or disable logging