add a multiplexer for the logging.Tracer

This commit is contained in:
Marten Seemann
2020-07-09 14:47:02 +07:00
parent 2d4eca1dd6
commit c8d434305c
5 changed files with 283 additions and 125 deletions

View File

@@ -79,7 +79,11 @@ const (
// A Tracer traces events.
type Tracer interface {
// TracerForServer requests a new tracer for a connection that was accepted by the server.
// If nil is returned, tracing will be disabled for this connection.
TracerForServer(odcid ConnectionID) ConnectionTracer
// TracerForServer requests a new tracer for a connection that was dialed by the client.
// If nil is returned, tracing will be disabled for this connection.
TracerForClient(odcid ConnectionID) ConnectionTracer
}