docs: def setup_log(name):
      '''Returns a logging instance for the provided name. The returned
      object is an instance of logging.Logger. Logged messages will be
      printed to stderr when running in the CLI, or forwarded to XBMC's
      log when running in XBMC mode.
      '''
      _log = logging.getLogger(name)
      _log.setLevel(GLOBAL_LOG_LEVEL)
      handler = logging.StreamHandler()
      formatter = logging.Formatter(
          '%(asctime)s - %(levelname)s - [%(name)s] %(message)s')
      handler.setFormatter(formatter)
      _log.addHandler(handler)
      _log.addFilter(XBMCFilter('[%s] ' % name))
      return _log