-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: Fix log functions to report correct filename and line info
The log functions wrap around Go's builtin 'log' module. While the latter reports the filename and line where the log messages emit, they were always the file 'log.go' and lines in it. So implement the 'getOrigin()' function to obtain the real caller info by our own. In addition, obtain the function name of the caller and report in the log messages. Credit: https://stackoverflow.com/a/58232098
- Loading branch information
1 parent
71f8458
commit 385744a
Showing
1 changed file
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters