add package intlog for GF internal logging usage; improve redis storage feature for gsession

This commit is contained in:
John
2019-10-29 16:45:42 +08:00
parent 14e9deb254
commit 7225e49aa0
13 changed files with 176 additions and 118 deletions

View File

@ -227,3 +227,9 @@ func CallerFileLine() string {
_, path, line := Caller()
return fmt.Sprintf(`%s:%d`, path, line)
}
// CallerFileLineShort returns the file name along with the line number of the caller.
func CallerFileLineShort() string {
_, path, line := Caller()
return fmt.Sprintf(`%s:%d`, filepath.Base(path), line)
}