mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
Shorten peer public key in connection logs
This commit is contained in:
@@ -127,7 +127,7 @@ func NewConn(config ConnConfig, services ServiceDependencies) (*Conn, error) {
|
|||||||
return nil, fmt.Errorf("allowed IPs is empty")
|
return nil, fmt.Errorf("allowed IPs is empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
connLog := log.WithField("peer", config.Key)
|
connLog := log.WithField("peer", shortenKey(config.Key))
|
||||||
|
|
||||||
var conn = &Conn{
|
var conn = &Conn{
|
||||||
Log: connLog,
|
Log: connLog,
|
||||||
|
|||||||
5
client/internal/peer/key.go
Normal file
5
client/internal/peer/key.go
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
package peer
|
||||||
|
|
||||||
|
func shortenKey(pubKey string) string {
|
||||||
|
return pubKey[:7]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user