We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would be nice if the hook has the option do display function name, just something like that could help:
pc := make([]uintptr, 15) n := runtime.Callers(8, pc) frames := runtime.CallersFrames(pc[:n]) frame, _ := frames.Next() return fmt.Sprintf("%s:%d - %s", frame.File, frame.Line, frame.Function)
The text was updated successfully, but these errors were encountered:
I implemented function name logging. You can customize output:
hook := filename.NewHook() hook.Formatter = func(file, function string, line int) string { fmt.Sprintf("%s:%d - %s", file, line, function) }
Sorry, something went wrong.
Excellent! Thank you!
func(file, function string, line int) string { fmt.Sprintf("%s:%d - %s", file, line, function) }
missing "return" for fmt.Sprintf...
No branches or pull requests
Would be nice if the hook has the option do display function name, just something like that could help:
The text was updated successfully, but these errors were encountered: