Skip to content

What goroutine i should to log? #5

@rugleb

Description

@rugleb

Which gourotine i should to log, when recovering from panic?

Example:

	if err := recover(); err != nil {
		stack := debug.Stack()
		goroutines, _ := gostackparse.Parse(bytes.NewReader(stack))
		log(goroutines[0]) // ?
	}

Potentially, the number of goroutines can be more than one. Which one do I need to use to get the current call stack?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions