aboutsummaryrefslogtreecommitdiffstats
path: root/logging/test
diff options
context:
space:
mode:
authorMarc Pervaz Boocha <mboocha@sudomsg.com>2026-02-28 00:16:22 +0530
committerMarc Pervaz Boocha <mboocha@sudomsg.com>2026-02-28 00:16:22 +0530
commit1c75db8c1d1dc6a0a9097016dbdbbb4348f5c835 (patch)
treee3aa95caea8ea13b2e50b69babad2ab9eebfa0f2 /logging/test
parentAdd Syslog and refactored the Sink api (diff)
downloadkit-main.tar
kit-main.tar.gz
kit-main.tar.bz2
kit-main.tar.lz
kit-main.tar.xz
kit-main.tar.zst
kit-main.zip
Add Host Loggermain
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,
}
}