1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-28 21:09:17 +02:00
opentelemetry-go/log/logtest
Damien Mathieu ebd0adee35
Split log/logtest into a recorder and a logger (#5365)
The current logtest.Recorder implementation is wrong. We have a single
`Recorder`, which acts as both a `LoggerProvider`, and a `Logger`,
making it possible to emit a log entry with the root recorder, which
shouldn't be possible with the API.

This change introduces a new private struct, `logger` that acts as the
recording logger, while `Recorder` becomes only a LoggerProvider and not
a Logger anymore.

Closes #5357.

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-05-17 07:28:40 -07:00
..
doc.go log/logtest: add Record Factory (#5263) 2024-04-25 07:22:39 +02:00
factory_test.go log/logtest: add Record Factory (#5263) 2024-04-25 07:22:39 +02:00
factory.go log/logtest: add Record Factory (#5263) 2024-04-25 07:22:39 +02:00
README.md logtest: Add Recorder (#5134) 2024-04-09 06:45:25 -07:00
recorder_test.go Split log/logtest into a recorder and a logger (#5365) 2024-05-17 07:28:40 -07:00
recorder.go Split log/logtest into a recorder and a logger (#5365) 2024-05-17 07:28:40 -07:00

Log Test

PkgGoDev