|
@@ -157,3 +157,21 @@ func Errorf(format string, a ...interface{}) {
|
|
fmt.Fprintf(os.Stderr, "ERROR: %s %v:%v: %s\n", time.Now().Format("01:04:05.000"), file, line, fmt.Sprintf(format, dump(a...)...))
|
|
fmt.Fprintf(os.Stderr, "ERROR: %s %v:%v: %s\n", time.Now().Format("01:04:05.000"), file, line, fmt.Sprintf(format, dump(a...)...))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// RError log
|
|
|
|
+func RError(a ...interface{}) {
|
|
|
|
+ if level <= ERROR {
|
|
|
|
+ _, path, line, _ := runtime.Caller(2)
|
|
|
|
+ _, file := filepath.Split(path)
|
|
|
|
+ fmt.Fprintf(os.Stderr, "ERROR: %s %v:%v: %s\n", time.Now().Format("01:04:05.000"), file, line, fmt.Sprint(dump(a...)...))
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// RErrorf log
|
|
|
|
+func RErrorf(format string, a ...interface{}) {
|
|
|
|
+ if level <= ERROR {
|
|
|
|
+ _, path, line, _ := runtime.Caller(2)
|
|
|
|
+ _, file := filepath.Split(path)
|
|
|
|
+ fmt.Fprintf(os.Stderr, "ERROR: %s %v:%v: %s\n", time.Now().Format("01:04:05.000"), file, line, fmt.Sprintf(format, dump(a...)...))
|
|
|
|
+ }
|
|
|
|
+}
|