func logPanic(msg string) { cfg, err := config.Init(flashlight.PackageVersion, *configdir, *stickyConfig, flagsAsMap()) if err != nil { panic("Error initializing config") } if err := logging.EnableFileLogging(); err != nil { panic("Error initializing logging") } <-logging.Configure(eventual.DefaultGetter(""), "", cfg.Client.DeviceID, flashlight.Version, flashlight.RevisionDate) log.Error(msg) logging.Flush() _ = logging.Close() }
func logPanic(msg string) { cfg, err := config.Init(packageVersion) if err != nil { panic("Error initializing config") } if err := logging.Init(); err != nil { panic("Error initializing logging") } <-logging.Configure("", "", cfg.InstanceId, version, revisionDate) log.Error(msg) logging.Flush() _ = logging.Close() }