mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-16 03:14:44 +00:00
wgengine: log node IDs when peers are added/removed (#381)
Also stop logging data sent/received from nodes we're not connected to (ie all those `x`s being logged in the `peers: ` line) Signed-off-by: Wendi <wendi.yu@yahoo.ca>
This commit is contained in:
@@ -13,8 +13,6 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"tailscale.com/types/logger"
|
||||
|
||||
"tailscale.com/ipn"
|
||||
"tailscale.com/ipn/ipnserver"
|
||||
"tailscale.com/safesocket"
|
||||
@@ -34,14 +32,12 @@ func TestRunMultipleAccepts(t *testing.T) {
|
||||
defer os.RemoveAll(td)
|
||||
socketPath := filepath.Join(td, "tailscale.sock")
|
||||
|
||||
ulogf := func(format string, args ...interface{}) {
|
||||
logf := func(format string, args ...interface{}) {
|
||||
format = strings.TrimRight(format, "\n")
|
||||
println(fmt.Sprintf(format, args...))
|
||||
t.Logf(format, args...)
|
||||
}
|
||||
|
||||
logf := logger.RateLimitedFn(ulogf, 1, 1, 100)
|
||||
|
||||
connect := func() {
|
||||
for i := 1; i <= 2; i++ {
|
||||
logf("connect %d ...", i)
|
||||
|
Reference in New Issue
Block a user