-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
Function Name #716
Comments
This doesn't exist today, zap can only add file:line. I think adding the function could be a useful option though. |
We'll be happy to accept a PR implementing this, thanks! |
I'd like to implement this. This is my first time contributing to open source repo, so please bear with me. Several API changes I think of:
type Entry struct {
...
Caller EntryCaller
Function string
Stack string
}
type EncoderConfig struct {
...
CallerKey string `json:"callerKey" yaml:"callerKey"`
FunctionKey string `json:"functionKey" yaml:"functionKey"`
StacktraceKey string `json:"stacktraceKey" yaml:"stacktraceKey"`
...
}
We can introduce
I can't think about how we want to encode function names other than the name given by runtime. So, I think we won't need Would love to hear your opinion on this, thanks! |
Is there a way to modify configuration or some tweak in caller configuration so that I can as well have a function name along with filename and line. Currently I had written my own code to do it using
runtime
.Thanks
The text was updated successfully, but these errors were encountered: