mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-22 08:09:13 -04:00
also add source to Test logger
This commit is contained in:
parent
e435211a70
commit
b0bbea80f1
@ -107,7 +107,7 @@ func NewJSONLogger(level slog.Level) *slog.Logger {
|
||||
|
||||
// NewTest creates a new slog.Logger that writes to a testing.T.
|
||||
func NewTest(t *testing.T) *slog.Logger {
|
||||
return slog.New(slog.NewTextHandler(testWriter{t: t}, nil))
|
||||
return slog.New(slog.NewTextHandler(testWriter{t: t}, &slog.HandlerOptions{AddSource: true}))
|
||||
}
|
||||
|
||||
// TestWriter is a writer to a testing.T used in tests for logging with slog.
|
||||
|
Loading…
x
Reference in New Issue
Block a user