Get right logrus package name

This commit is contained in:
Alex S
2020-02-27 11:04:36 +08:00
parent 77ab282a06
commit 86a84a9d18
3 changed files with 21 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
// +build !go1.14
package logrus
import "runtime"
// funcName returns the function name that logrus calls
func funcName(pcs []uintptr) string {
return runtime.FuncForPC(pcs[1]).Name()
}