code: def set(self, mode, disable):
          
          global logger
          try:
              if logger:
                  if disable:
                      logger.disabled = True
              else:
                  if mode in ('STREAM', 'FILE'):
                      logger = logd.getLogger(mode, __version__)
          except Exception as e:
              logger.exception(
                  '%s: Problem incurred during logging setup' % inspect.stack()[0][3]
                  )
              return False
          return True
docs: create logger object, enable or disable logging