Skip to content

Commit

Permalink
test(plc4go/spi): add stack trace logging to loggers for test
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Aug 7, 2023
1 parent 5a5ed86 commit 5a4c032
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plc4go/spi/testutils/TestUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"bytes"
"context"
"fmt"
"github.com/rs/zerolog/pkgerrors"
"os"
"runtime"
"runtime/debug"
Expand Down Expand Up @@ -224,6 +225,8 @@ func ProduceTestingLogger(t *testing.T) zerolog.Logger {
if highLogPrecision {
logger = logger.With().Timestamp().Logger()
}
zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack
logger = logger.With().Stack().Logger()
return logger
}

Expand Down

0 comments on commit 5a4c032

Please sign in to comment.