mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-06 01:55:58 +08:00
message update
This commit is contained in:
@@ -39,35 +39,3 @@ func (f *fileHook) Fire(entry *logrus.Entry) error {
|
||||
entry.Data["FilePath"] = s
|
||||
return nil
|
||||
}
|
||||
|
||||
//func findCaller(skip int) string {
|
||||
// file := ""
|
||||
// line := 0
|
||||
// for i := 0; i < 10; i++ {
|
||||
// file, line = getCaller(skip + i)
|
||||
// if !strings.HasPrefix(file, "log") {
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// return fmt.Sprintf("%s:%d", file, line)
|
||||
//}
|
||||
//
|
||||
//func getCaller(skip int) (string, int) {
|
||||
// _, file, line, ok := runtime.Caller(skip)
|
||||
//
|
||||
// if !ok {
|
||||
// return "", 0
|
||||
// }
|
||||
// fmt.Println("skip:", skip, "file:", file, "line", line)
|
||||
// n := 0
|
||||
// for i := len(file) - 1; i > 0; i-- {
|
||||
// if file[i] == '/' {
|
||||
// n++
|
||||
// if n >= 2 {
|
||||
// file = file[i+1:]
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return file, line
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user