1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
package util import ( "log" "os" ) var errorLogger = log.New(os.Stderr, "ERROR ", log.LstdFlags|log.Lmsgprefix) func Error(v ...interface{}) { errorLogger.Print(v...) } //noinspection GoUnusedExportedFunction func Errorf(format string, a ...interface{}) { errorLogger.Printf(format, a...) }