Beispiel #1
0
func Error(format string, v ...interface{}) {
	if std.level >= ERROR {
		std.SetPrefix("ERROR")
		s := fmt.Sprintf(format, v...)
		if std.useColors {
			ct.ChangeColor(ct.Red, false, ct.None, false)
			defer ct.ResetColor()
		}
		std.Output(s)
	}
}
Beispiel #2
0
func Debug(format string, v ...interface{}) {
	if std.level >= DEBUG {
		std.SetPrefix("DEBUG")

		s := fmt.Sprintf(format, v...)

		if std.useColors {
			ct.ChangeColor(ct.Yellow, false, ct.None, false)
			defer ct.ResetColor()
		}
		std.Output(s)
	}
}
Beispiel #3
0
func Info(format string, v ...interface{}) {
	if std.level >= INFO {
		std.SetPrefix("INFO")
		s := fmt.Sprintf(format, v...)

		if std.useColors {
			ct.ChangeColor(ct.White, false, ct.None, false)
			defer ct.ResetColor()
		}

		std.Output(s)
	}
}