Skip to content

Commit

Permalink
refactor(plc4go): switch from global loggers to local loggers
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Jun 1, 2023
1 parent 95571e9 commit 04d235d
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 26 deletions.
6 changes: 6 additions & 0 deletions plc4go/internal/cbus/Reader_test.go
Expand Up @@ -445,6 +445,8 @@ func TestReader_sendMessageOverTheWire(t *testing.T) {
},
},
setup: func(t *testing.T, fields *fields, args *args) {
testutils.SetToTestingLogger(t, readWriteModel.Plc4xModelLog)

loggerOption := options.WithCustomLogger(testutils.ProduceTestingLogger(t))

transport := test.NewTransport(loggerOption)
Expand Down Expand Up @@ -558,6 +560,8 @@ func TestReader_sendMessageOverTheWire(t *testing.T) {
},
},
setup: func(t *testing.T, fields *fields, args *args) {
testutils.SetToTestingLogger(t, readWriteModel.Plc4xModelLog)

transaction := NewMockRequestTransaction(t)
expect := transaction.EXPECT()
expect.FailRequest(mock.Anything).Return(errors.New("Nope"))
Expand Down Expand Up @@ -649,6 +653,8 @@ func TestReader_sendMessageOverTheWire(t *testing.T) {
},
},
setup: func(t *testing.T, fields *fields, args *args) {
testutils.SetToTestingLogger(t, readWriteModel.Plc4xModelLog)

transaction := NewMockRequestTransaction(t)
expect := transaction.EXPECT()
expect.EndRequest().Return(nil)
Expand Down
15 changes: 8 additions & 7 deletions plc4go/pkg/api/cache/mock_tracedPlcConnection_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 93 additions & 0 deletions plc4go/pkg/api/config/mock_WithOption_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 53 additions & 5 deletions plc4go/protocols/knxnetip/readwrite/model/KnxManufacturer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions plc4go/spi/default/mock_CustomMessageHandler_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 04d235d

Please sign in to comment.