-
Notifications
You must be signed in to change notification settings - Fork 144
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
Record.CallPC is too short #102
Comments
What do you want to do in |
I have multi tasks to do, each task is a go routine. I want each log have a task id, something like:
I use gls to store the logger interface. I need featch the special logger in func Info_wrapper(value interface{}...) {
logger = gls.Get("logger").(log.logger)
logger.Info(....)
}
func InitLogger(taskId int) {
logger = log.New("taskId": taskId)
gls.Set("logger", logger)
// set custom Format and handler here
} so, do you have any other idea to implement this? Thanks |
sorry for my chinglish : ) |
I've run into this same kind of problem while using pkg/errors: pkg/errors#129. |
CallPC should by more large for this situation:
The text was updated successfully, but these errors were encountered: