https://github.com/zhl11b/logrus-hook-caller
hook for logrus make it display linenum
https://github.com/zhl11b/logrus-hook-caller
hooks logrus
Last synced: 3 months ago
JSON representation
hook for logrus make it display linenum
- Host: GitHub
- URL: https://github.com/zhl11b/logrus-hook-caller
- Owner: zhl11b
- License: mit
- Created: 2016-08-20T10:55:57.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T06:14:52.000Z (over 8 years ago)
- Last Synced: 2025-12-18T14:56:21.510Z (6 months ago)
- Topics: hooks, logrus
- Language: Go
- Size: 6.84 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logrus-hook-caller
[](https://goreportcard.com/report/github.com/zhl11b/logrus-hook-caller)
make logrus display linenum and filename no matter use logrus.Debugf("xx") or logrus.Withfield("xx","xx").Debugf("xx")
cation!! because Debugf or Debugln's call deepth are diferent with Debug.so you have to use Debugf instead Debug, then you can get right caller.
注意!!因为Debuf,Debugln和Debug的调用深度不一样。所以需要使用Debugf取代Debug,那么就可以正确的显示行了。