package log import ( "fmt" "github.com/golang/glog" ) func Debug(msg string) { glog.V(1).Info(fmt.Sprintf("[DEBUG]\t%s", msg)) } func Info(msg string) { glog.Info(fmt.Sprintf("[INFO]\t%s", msg)) } func Warning(msg string) { glog.InfoDepth(1, fmt.Sprintf("[WARNING]\t%s", msg)) } func Error(msg string) { glog.InfoDepth(2, fmt.Sprintf("[ERROR]\t%s", msg)) } func Flush() { glog.Flush() } type ABTestLogger struct{} func (l ABTestLogger) Infof(msg string, args ...interface{}) { Info(fmt.Sprintf(msg, args...)) } func (l ABTestLogger) Errorf(msg string, args ...interface{}) { Error(fmt.Sprintf(msg, args...)) }