优化日志及config

This commit is contained in:
hoteas
2022-07-11 11:07:17 +08:00
parent 83acef93a9
commit 15b73b3ce7
8 changed files with 541 additions and 8 deletions
+16 -3
View File
@@ -82,10 +82,23 @@ func findCaller(skip int) string {
for i := 0; i < 10; i++ {
file, line = getCaller(skip + i)
if !strings.HasPrefix(file, "logrus") {
if file == "common/error.go" {
file, line = getCaller(skip + i + 1)
j := 0
for true {
j++
if file == "common/error.go" {
file, line = getCaller(skip + i + j)
}
if file == "db/hotimedb.go" {
file, line = getCaller(skip + i + j)
}
//if file == "code/makecode.go" {
// file, line = getCaller(skip + i + j)
//}
if j == 5 {
break
}
}
break
}
}