aboutsummaryrefslogtreecommitdiff
path: root/hotline/server_blackbox_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/server_blackbox_test.go')
-rw-r--r--hotline/server_blackbox_test.go20
1 files changed, 3 insertions, 17 deletions
diff --git a/hotline/server_blackbox_test.go b/hotline/server_blackbox_test.go
index 138a17f..27ac4a7 100644
--- a/hotline/server_blackbox_test.go
+++ b/hotline/server_blackbox_test.go
@@ -4,27 +4,13 @@ import (
"bytes"
"encoding/hex"
"github.com/stretchr/testify/assert"
- "go.uber.org/zap"
- "go.uber.org/zap/zapcore"
+ "log/slog"
"os"
"testing"
)
-func NewTestLogger() *zap.SugaredLogger {
- encoderCfg := zap.NewProductionEncoderConfig()
- encoderCfg.TimeKey = "timestamp"
- encoderCfg.EncodeTime = zapcore.ISO8601TimeEncoder
-
- core := zapcore.NewCore(
- zapcore.NewConsoleEncoder(encoderCfg),
- zapcore.Lock(os.Stdout),
- zap.DebugLevel,
- )
-
- cores := []zapcore.Core{core}
- l := zap.New(zapcore.NewTee(cores...))
- defer func() { _ = l.Sync() }()
- return l.Sugar()
+func NewTestLogger() *slog.Logger {
+ return slog.New(slog.NewTextHandler(os.Stdout, nil))
}
// assertTransferBytesEqual takes a string with a hexdump in the same format that `hexdump -C` produces and compares with