Closed spiderpoison closed 6 years ago
Fixed.
if my project named "logrus"(like go/src/test/logrus), it's still wrong. It is not enough: SkipPrefixes: []string{"logrus/", "logrus@"},
@shutcode You can customise SkipPrefixes.
hook := filename.NewHook()
hook.SkipPrefixes = []string{"Custom", "prefixes"}
for example i have a proc in path "logrus_test" like this:
func main() { log.AddHook(filename.NewHook())
}
the output like this:
time="2018-08-01T19:37:01+08:00" level=debug msg="Useful debugging information." source="runtime/proc.go:195"