This is an automated email from the ASF dual-hosted git repository. sruehl pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push: new 482817ec29 feat(plc4go): change to TestingLog interface for TestLogger 482817ec29 is described below commit 482817ec2976952fcb6aa5754c914ba2b3f1ea56 Author: Sebastian Rühl <sru...@apache.org> AuthorDate: Wed Apr 10 17:22:19 2024 +0200 feat(plc4go): change to TestingLog interface for TestLogger --- plc4go/spi/testutils/TestUtils.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plc4go/spi/testutils/TestUtils.go b/plc4go/spi/testutils/TestUtils.go index 57fdf32ab6..45005dd91a 100644 --- a/plc4go/spi/testutils/TestUtils.go +++ b/plc4go/spi/testutils/TestUtils.go @@ -180,8 +180,14 @@ func shouldNoColor() bool { return noColor } +type TestingLog interface { + Log(args ...interface{}) + Logf(format string, args ...interface{}) + Helper() +} + // ProduceTestingLogger produces a logger which redirects to testing.T -func ProduceTestingLogger(t *testing.T) zerolog.Logger { +func ProduceTestingLogger(t TestingLog) zerolog.Logger { noColor := shouldNoColor() consoleWriter := zerolog.NewConsoleWriter( zerolog.ConsoleTestWriter(t),