Пример #1
0
// Fatalf This notifies bugsnag and logs the error based on the args then quits
func (l *Logger) Fatalf(msg string, args ...interface{}) {
	l.Errorf(msg, args)
	bugsnag.Notify(fmt.Errorf(msg, args), bugsnag.MetaData{
		"SphereConfig": config.GetAll(true),
	})
	os.Exit(1)
}
Пример #2
0
// HandleError This notifies bugsnag and logs the error.
func (l *Logger) HandleError(err error, msg string) {
	l.Errorf("%s : %v", msg, err)
	// config.GetAll(true)
	bugsnag.Notify(err, bugsnag.MetaData{
		"SphereConfig": config.GetAll(true),
	})
}
Пример #3
0
// FatalError This notifies bugsnag and logs the error then quits.
func (l *Logger) FatalError(err error, msg string) {
	l.Errorf("%s : %v", msg, err)
	bugsnag.Notify(err, bugsnag.MetaData{
		"SphereConfig": config.GetAll(true),
	})

	os.Exit(1)
}
Пример #4
0
// HandleErrorf This notifies bugsnag and logs the error based on the args.
func (l *Logger) HandleErrorf(err error, msg string, args ...interface{}) {
	l.Errorf(msg, args)
	bugsnag.Notify(err, bugsnag.MetaData{
		"SphereConfig": config.GetAll(true),
	})
}