mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-05 05:11:30 -04:00
added a test writer
removed unnecessary writer
This commit is contained in:
parent
6cc282bc7c
commit
1d0c6aa7fc
1 changed files with 12 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue