code: def apptags(self):
          
          logger.debug("populate tags map ...")
          apps = self._apps.keys()
          unknown = set(apps)
          unknown.difference_update(self._config_apps.keys())
          if unknown:
              raise ValueError("unknown apps: %r" % list(unknown))
  
          apps = [v for v in self._config_apps.values() if v.name in apps]
          tagmap = {}
          for app in sorted(apps, key=lambda x: (x.priority, x.name)):
              for tag in app.tags:
                  if not tag:
                      raise LogRaptorConfigError('found an empty tag for app %r' % app.name)
                  try:
                      tagmap[tag].append(app)
                  except KeyError:
                      tagmap[tag] = [app]
          return tagmap
docs: Map from log app-name to an application.