2015-10-10 07:29:18 +00:00
|
|
|
package flog
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
var (
|
|
|
|
panicContext = map[string]interface{}{
|
|
|
|
"~type":"panic",
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2015-10-10 07:29:18 +00:00
|
|
|
func (flogger *internalFlogger) Panic(v ...interface{}) {
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
msg := fmt.Sprint(v...)
|
|
|
|
|
|
|
|
flogger.route(msg, panicContext)
|
|
|
|
panic(msg)
|
2015-10-10 07:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (flogger *internalFlogger) Panicf(format string, v ...interface{}) {
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
msg := fmt.Sprintf(format, v...)
|
|
|
|
|
|
|
|
flogger.route(msg, panicContext)
|
|
|
|
panic(msg)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (flogger *internalFlogger) Panicfv(panicValue interface{}, format string, v ...interface{}) {
|
|
|
|
|
|
|
|
msg := fmt.Sprintf(format, v...)
|
|
|
|
|
|
|
|
flogger.route(msg, panicContext)
|
|
|
|
panic(panicValue)
|
2015-10-10 07:29:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (flogger *internalFlogger) Panicln(v ...interface{}) {
|
|
|
|
|
2015-10-14 02:16:33 +00:00
|
|
|
msg := fmt.Sprintln(v...)
|
|
|
|
|
|
|
|
flogger.route(msg, panicContext)
|
|
|
|
panic(msg)
|
2015-10-10 07:29:18 +00:00
|
|
|
}
|