docs: def filter(self, record):
          '''Returns True for all records if running in the CLI, else returns
          True.
  
          When running inside XBMC it calls the xbmc.log() method and prevents
          the message from being double printed to STDOUT.
          '''
  
          # When running in XBMC, any logged statements will be double printed
          # since we are calling xbmc.log() explicitly. Therefore we return False
          # so every log message is filtered out and not printed again.
          if CLI_MODE:
              return True
          else:
              # Must not be imported until here because of import order issues
              # when running in CLI
              from xbmcswift2 import xbmc
              xbmc_level = XBMCFilter.xbmc_levels.get(
                  XBMCFilter.python_to_xbmc.get(record.levelname))
              xbmc.log('%s%s' % (self.prefix, record.getMessage()), xbmc_level)
              return False