net/portmapper: add logs about obtained mapping(s)

This logs additional information about what mapping(s) are obtained
during the creation process, including whether we return an existing
cached mapping.

Updates #10597

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I9ff25071f064c91691db9ab0b9365ccc5f948d6e
This commit is contained in:
Andrew Dunham
2023-12-19 15:47:34 -05:00
parent f815d66a88
commit 3c333f6341
4 changed files with 69 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ func TestClientProbeThenMap(t *testing.T) {
}
c := NewClient(t.Logf, nil, nil, new(controlknobs.Knobs), nil)
defer c.Close()
c.debug.VerboseLogs = true
c.SetLocalPort(1234)
res, err := c.Probe(context.Background())
t.Logf("Probe: %+v, %v", res, err)