anchor.diff: -= Developer guide: create a new Beat
  += Developer guide: creating a new Beat
   
   This guide walks you through the steps for creating a new Elastic Beat.
   The Beats are a collection of lightweight daemons that collection
  
positive.code: 
      logp.Debug("main", "Starting topbeat")
  
      err = topbeat.Run() <7>
      if err != nil {
          logp.Critical("Sniffer main loop failed: %v", err)
          os.Exit(1)
  
negative.code:         return
      }
  
      err := cfgfile.Read(&Config) <3>
  
      logp.Init(Name, &Config.Logging)
  
      logp.Debug("main", "Initializing output plugins")
      if err = publisher.Publisher.Init(Config.Output, Config.Shipper); err != nil
      { <4>
          logp.Critical(err.Error())
          os.Exit(1)
      }
  
      topbeat := &Topbeat{}
      if err = topbeat.Init(Config.Input, publisher.Publisher.Queue); err != nil {
      <5>
          logp.Critical(err.Error())
          os.Exit(1)
      }
  
      // Up to here was the initialization
      if cfgfile.IsTestConfig() { <6>
          // all good, exit with 0
          os.Exit(0)
      }
      service.BeforeRun()
  
      service.HandleSignals(topbeat.Stop) <7>
  
      // Startup successful, disable stderr logging if requested by
      // cmdline flag
  