This commit is contained in:
Miccah Castorina
2025-12-03 23:03:06 -08:00
parent 79a73b78db
commit 4fd5b23494
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ func AddSentry(l logr.Logger, opts sentry.ClientOptions, tags map[string]string)
// AddSink extends an existing logr.Logger with a new sink. It returns the new
// logr.Logger, a cleanup function, and an error. Note that values added to the
// existing logr.Logger via [logr.WithValues] before calling this function will
// not be propogated to the new sink, but they will continue to be written to
// not be propagated to the new sink, but they will continue to be written to
// the existing sink.
func AddSink(l logr.Logger, sink logConfig) (logr.Logger, func() error, error) {
if sink.err != nil {
+3 -3
View File
@@ -163,10 +163,10 @@ func TestAddSink(t *testing.T) {
assert.Contains(t, buf2.String(), "line 2")
}
// TestAddSinkDoesNotPropogateValues is a pinning test to document that the
// existing functionality of AddSink will not propogate values added to the
// TestAddSinkDoesNotPropagateValues is a pinning test to document that the
// existing functionality of AddSink will not propagate values added to the
// logger.
func TestAddSinkDoesNotPropogateValues(t *testing.T) {
func TestAddSinkDoesNotPropagateValues(t *testing.T) {
var buf1, buf2 bytes.Buffer
logger, _ := New("service-name",
WithConsoleSink(&buf1),