aboutsummaryrefslogtreecommitdiffstats
path: root/logging/test
diff options
context:
space:
mode:
Diffstat (limited to 'logging/test')
-rw-r--r--logging/test/handler.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/logging/test/handler.go b/logging/test/handler.go
index 210893b..a005987 100644
--- a/logging/test/handler.go
+++ b/logging/test/handler.go
@@ -9,7 +9,7 @@ import (
"sync"
"testing"
- "go.sudomsg.com/kit/logging/sinks"
+ "go.sudomsg.com/kit/logging"
)
type logRecorder struct {
@@ -17,15 +17,15 @@ type logRecorder struct {
records []map[string]any
}
-var _ sinks.Sink = &logRecorder{}
+var _ logging.Sink = &logRecorder{}
func (h *logRecorder) Append(r slog.Record) error {
h.mu.Lock()
defer h.mu.Unlock()
- it := sinks.RecordAll(r, nil)
+ it := logging.RecordAll(r, nil)
- h.records = append(h.records, sinks.ToMap(it))
+ h.records = append(h.records, logging.ToMap(it))
return nil
}
@@ -46,7 +46,7 @@ func (h *logRecorder) Records() []map[string]any {
//
// All recorded logs can be retrieved with the Records method.
type MockHandler struct {
- *sinks.SinkHandler
+ *logging.SinkHandler
recorder *logRecorder
}
@@ -59,7 +59,7 @@ func NewMockLogHandler(tb testing.TB) *MockHandler {
rec := &logRecorder{}
return &MockHandler{
- SinkHandler: sinks.NewSinkHandler(rec),
+ SinkHandler: logging.NewSinkHandler(rec),
recorder: rec,
}
}