diff --git a/logging/multiplex.go b/logging/multiplex.go index f219a43a..f06eaef4 100644 --- a/logging/multiplex.go +++ b/logging/multiplex.go @@ -11,7 +11,7 @@ type tracerMultiplexer struct { var _ Tracer = &tracerMultiplexer{} -// NewMultiplexedTracer creates a new tracer that multiplexes all events to multiple tracers. +// NewMultiplexedTracer creates a new tracer that multiplexes events to multiple tracers. func NewMultiplexedTracer(tracers ...Tracer) Tracer { if len(tracers) == 0 { return nil @@ -29,7 +29,7 @@ func (m *tracerMultiplexer) TracerForConnection(p Perspective, odcid ConnectionI connTracers = append(connTracers, ct) } } - return newConnectionMultiplexer(connTracers...) + return NewMultiplexedConnectionTracer(connTracers...) } func (m *tracerMultiplexer) SentPacket(remote net.Addr, hdr *Header, size ByteCount, frames []Frame) { @@ -50,7 +50,8 @@ type connTracerMultiplexer struct { var _ ConnectionTracer = &connTracerMultiplexer{} -func newConnectionMultiplexer(tracers ...ConnectionTracer) ConnectionTracer { +// NewMultiplexedConnectionTracer creates a new connection tracer that multiplexes events to multiple tracers. +func NewMultiplexedConnectionTracer(tracers ...ConnectionTracer) ConnectionTracer { if len(tracers) == 0 { return nil } diff --git a/logging/multiplex_test.go b/logging/multiplex_test.go index dbd068ac..28856aec 100644 --- a/logging/multiplex_test.go +++ b/logging/multiplex_test.go @@ -94,7 +94,7 @@ var _ = Describe("Tracing", func() { BeforeEach(func() { tr1 = NewMockConnectionTracer(mockCtrl) tr2 = NewMockConnectionTracer(mockCtrl) - tracer = newConnectionMultiplexer(tr1, tr2) + tracer = NewMultiplexedConnectionTracer(tr1, tr2) }) It("trace the ConnectionStarted event", func() {