示例#1
0
文件: log.go 项目: Gys/deployit
func (l *Log) Fatalf(format string, args ...interface{}) {
	if l.Logger.Level >= logrus.DebugLevel {
		entry := l.Logger.WithFields(logrus.Fields{})
		entry.Data["file"] = utils.FileLine()
		entry.Fatalf(format, args)
	}
}
示例#2
0
文件: log.go 项目: Gys/deployit
func (l *Log) Fatal(args ...interface{}) {
	if l.Logger.Level >= logrus.FatalLevel {
		entry := l.Logger.WithFields(logrus.Fields{})
		entry.Data["file"] = utils.FileLine()
		entry.Fatal(args...)
	}
}
示例#3
0
文件: print.go 项目: Gys/deployit
func (p *Print) Errorf(format string, a ...interface{}) {
	format += "\n"
	p.Red.Printf(format, "[ERROR, ", utils.FileLine(), "]: ", a)
}
示例#4
0
文件: print.go 项目: Gys/deployit
func (p *Print) Error(a ...interface{}) {
	p.Red.Print("[ERROR, ", utils.FileLine(), "]: ", a, "\n")
}
示例#5
0
文件: print.go 项目: Gys/deployit
func (p *Print) Debugf(format string, a ...interface{}) {
	if p.DebugMode {
		format += "\n"
		p.White.Printf(format, "[DEBUG, ", utils.FileLine(), "]: ", a)
	}
}
示例#6
0
文件: print.go 项目: Gys/deployit
func (p *Print) Debug(a ...interface{}) {
	if p.DebugMode {
		p.White.Print("[DEBUG, ", utils.FileLine(), "]: ", a, "\n")
	}
}