mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-06 05:29:07 +02:00
print stack
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/netip"
|
"net/netip"
|
||||||
|
"runtime/debug"
|
||||||
"slices"
|
"slices"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@@ -1476,5 +1477,6 @@ func (fs FullStatus) ToProto() *proto.FullStatus {
|
|||||||
func debugElapsed(msg string, startTime time.Time) {
|
func debugElapsed(msg string, startTime time.Time) {
|
||||||
if elapsed := time.Since(startTime); elapsed > 1*time.Second {
|
if elapsed := time.Since(startTime); elapsed > 1*time.Second {
|
||||||
log.Infof("run %s took %s", msg, elapsed)
|
log.Infof("run %s took %s", msg, elapsed)
|
||||||
|
debug.PrintStack()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user