added a test writer

removed unnecessary writer
This commit is contained in:
miampf 2023-12-29 15:15:43 +01:00
parent 6cc282bc7c
commit 1d0c6aa7fc
No known key found for this signature in database
GPG key ID: 376EAC0E5307A669

View file

@ -41,11 +41,12 @@ package logger
import (
"context"
"fmt"
"io"
"log/slog"
"os"
"runtime"
"testing"
"runtime"
"time"
"time"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"go.uber.org/zap"
@ -231,3 +232,12 @@ func middlewareLogger(l *slog.Logger) logging.Logger {
_ = l.Handler().Handle(context.Background(), r)
})
}
type TestWriter struct {
t *testing.T
}
func (t TestWriter) Write(p []byte) (int, error) {
t.t.Log(p)
return len(p), nil
}