mirror of
https://github.com/netbirdio/netbird.git
synced 2025-08-09 15:25:20 +02:00
Print out the goroutine id (#3433)
The TXT logger prints out the actual go routine ID This feature depends on 'loggoroutine' build tag ```go build -tags loggoroutine```
This commit is contained in:
12
formatter/hook/additional_goroutine.go
Normal file
12
formatter/hook/additional_goroutine.go
Normal file
@ -0,0 +1,12 @@
|
||||
//go:build loggoroutine
|
||||
|
||||
package hook
|
||||
|
||||
import (
|
||||
"github.com/petermattis/goid"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func additionalEntries(entry *log.Entry) {
|
||||
entry.Data[EntryKeyGoroutineID] = goid.Get()
|
||||
}
|
Reference in New Issue
Block a user