// Panic is equivalent to Log() followed by a call to panic().
4688
func Panic(a ...interface{}) {
	Log(a...)
	panic(strings.TrimSpace(fmt.Sprintln(a...)))
}
1079384
func Panicf(s string, vals ...interface{}) {
	log.di(fnLevelDiPlus1).Panicf(s, vals...)
}
400857
func (l *Logger) PanicE(msg string, e error) {
	l.Panic(l.formatErr(e, msg))
}
489562
func (l *Logger) Panicln(v ...interface{}) {
	if l.Level >= PanicLevel {
		l.Logger.Panicln(PanicLevel.String() + fmt.Sprint(v...))
	}
}
211539
func PanicIfErr(err error, msg string, args ...interface{}) {
	if err != nil {
		panic(fmt.Sprintf("%s: %s", err.Error(), fmt.Sprintf(msg, args...)))
	}
}
353659
func (entry *Entry) Panic(args ...interface{}) {
	entry.WithField(errorLevelKey, "panic").Entry.Error(args...)
	safeRollbarWait(time.Second)
	panic(fmt.Sprint(args...))
}
277012
func LogPanic() {
	if rec := recover(); rec != nil {
		switch e := rec.(type) {
		case error:
			WithError(e).Panic(e.Error())
		default:
			Panicf("%v", rec)
		}
	}
}
776681
func panicHandler(logF *os.File) panicwrap.HandlerFunc {
	return func(m string) {
		// Right away just output this thing on stderr so that it gets
		// shown in case anything below fails.
		fmt.Fprintf(os.Stderr, fmt.Sprintf("%s\n", m))

		// Create the crash log file where we'll write the logs
		f, err := os.Create("crash.log")
		if err != nil {
			fmt.Fprintf(os.Stderr, "Failed to create crash log file: %s", err)
			return
		}
		defer f.Close()

		// Seek the log file back to the beginning
		if _, err = logF.Seek(0, 0); err != nil {
			fmt.Fprintf(os.Stderr, "Failed to seek log file for crash: %s", err)
			return
		}

		// Copy the contents to the crash file. This will include
		// the panic that just happened.
		if _, err = io.Copy(f, logF); err != nil {
			fmt.Fprintf(os.Stderr, "Failed to write crash log: %s", err)
			return
		}

		// Tell the user a crash occurred in some helpful way that
		// they'll hopefully notice.
		fmt.Printf("\n\n")
		fmt.Println(strings.TrimSpace(panicOutput))
	}
}
202046
func Panicf(format string, a ...interface{}) {
	Logf(format, a...)
	panic(fmt.Sprintf(format, a...))
}
1302444
func PanicString(t testing.TB, fn func(), str string, args ...interface{}) {
	if has, msg := HasPanic(fn); has {
		index := strings.Index(fmt.Sprint(msg), str)
		assert(t, index >= 0, args, []interface{}{"并未发生 panic"})
	}
}
1108719
func (logs *Logs) Panic(v ...interface{}) {
	s := fmt.Sprint(v...)
	logs.all(s)
	logs.Flush()
	panic(s)
}
1197501
func (l *Logger) Panicm(message string, v Map) {
	l.Emit(1, message, v)
	panic(message)
}
502964
func (e Error) Panicf(args ...interface{}) {
	_, fn, line, _ := runtime.Caller(1)
	errMsg := e.Format(args...).Error()
	errMsg += "\nCaller was: " + fmt.Sprintf("%s:%d", fn, line)
	panic(errMsg)
}
530876
func Panicln(v ...interface{}) {
	s := fmt.Sprintln(v...)
	Logger.Output(2, s)
	panic(s)
}
51566
func (l *Logger) Panicf(msg string, params ...interface{}) {
	if l.shouldAppend(PANIC) {
		l.makeLog(fmt.Sprintf(msg, params...), PANIC, nil)
		panic(msg)
	}
}
209488
func (l *Logger) Panicf(format string, v ...interface{}) {
	l.Fprint(l.flags, LEVEL_CRITICAL, 2, fmt.Sprintf(format, v...), nil)
	panic(v)
}
450884
func (l *Logger) Panicln(v ...interface{}) {
	s := fmt.Sprintln(v...)
	_ = l.Output(FATAL, 4, s)
	panic(s)
}