redis-shake工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
555 B

package log
import (
"github.com/go-stack/stack"
"os"
)
func Debugf(format string, args ...interface{}) {
logger.Debug().Msgf(format, args...)
}
func Infof(format string, args ...interface{}) {
logger.Info().Msgf(format, args...)
}
func Warnf(format string, args ...interface{}) {
logger.Warn().Msgf(format, args...)
}
func Panicf(format string, args ...interface{}) {
frames := stack.Trace().TrimRuntime()
for _, frame := range frames {
logger.Warn().Msgf("%+v -> %n()", frame, frame)
}
logger.Error().Msgf(format, args...)
os.Exit(1)
}