You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2023/06/20 14:22:25 UTC

[plc4x] branch develop updated (35bf97a71c -> 9bb5a88be7)

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


    from 35bf97a71c feat(plc4go/eip): output message before to better understand test failure
     new 6000069a02 feat(plc4go/spi): improve output from DriverTestRunner
     new 9d1877f381 fix(plc4go): return correct WithOption for WithExecutorOptionTracerWorkers
     new 9bb5a88be7 feat(plc4go): define custom Logger and tracer for bacnet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../bacnet/discovery/hello_world_plc4go_bacnet_discovery.go      | 9 ++++++---
 plc4go/pkg/api/config/config.go                                  | 2 +-
 plc4go/spi/testutils/DriverTestRunner.go                         | 4 +---
 3 files changed, 8 insertions(+), 7 deletions(-)


[plc4x] 02/03: fix(plc4go): return correct WithOption for WithExecutorOptionTracerWorkers

Posted by sr...@apache.org.
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

commit 9d1877f38195ef759baaf2551b10ca51756f626c
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jun 20 16:16:25 2023 +0200

    fix(plc4go): return correct WithOption for WithExecutorOptionTracerWorkers
---
 plc4go/pkg/api/config/config.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4go/pkg/api/config/config.go b/plc4go/pkg/api/config/config.go
index c731f181db..3975121b7c 100644
--- a/plc4go/pkg/api/config/config.go
+++ b/plc4go/pkg/api/config/config.go
@@ -71,7 +71,7 @@ func WithTraceDefaultMessageCodecWorker(traceWorkers bool) WithOption {
 }
 
 // WithExecutorOptionTracerWorkers sets a flag which extends logging for workers
-func WithExecutorOptionTracerWorkers(traceWorkers bool) options.WithOption {
+func WithExecutorOptionTracerWorkers(traceWorkers bool) WithOption {
 	return options.WithExecutorOptionTracerWorkers(traceWorkers)
 }
 


[plc4x] 03/03: feat(plc4go): define custom Logger and tracer for bacnet

Posted by sr...@apache.org.
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

commit 9bb5a88be7791d0e9b877cd9cc04abff5968f419
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jun 20 16:22:10 2023 +0200

    feat(plc4go): define custom Logger and tracer for bacnet
---
 .../bacnet/discovery/hello_world_plc4go_bacnet_discovery.go      | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/plc4go/examples/bacnet/discovery/hello_world_plc4go_bacnet_discovery.go b/plc4go/examples/bacnet/discovery/hello_world_plc4go_bacnet_discovery.go
index 88cfb10648..d2faccf7a9 100644
--- a/plc4go/examples/bacnet/discovery/hello_world_plc4go_bacnet_discovery.go
+++ b/plc4go/examples/bacnet/discovery/hello_world_plc4go_bacnet_discovery.go
@@ -21,21 +21,24 @@ package main
 
 import (
 	"fmt"
+	"github.com/apache/plc4x/plc4go/spi/options"
 	"os"
 	"time"
 
 	"github.com/apache/plc4x/plc4go/pkg/api"
 	"github.com/apache/plc4x/plc4go/pkg/api/drivers"
-	"github.com/apache/plc4x/plc4go/pkg/api/logging"
 	apiModel "github.com/apache/plc4x/plc4go/pkg/api/model"
 
 	"github.com/rs/zerolog/log"
 )
 
 func main() {
-	logging.InfoLevel()
+	logger := log.With().Str("myCustomLogger", "example").Logger()
 
-	driverManager := plc4go.NewPlcDriverManager()
+	driverManager := plc4go.NewPlcDriverManager(
+		options.WithCustomLogger(logger),
+		options.WithTraceTransactionManagerTransactions(true),
+	)
 	defer func() {
 		if err := driverManager.Close(); err != nil {
 			panic(err)


[plc4x] 01/03: feat(plc4go/spi): improve output from DriverTestRunner

Posted by sr...@apache.org.
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

commit 6000069a02ffbe83ce2438e1cd1a5f45730e2883
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jun 20 11:17:35 2023 +0200

    feat(plc4go/spi): improve output from DriverTestRunner
---
 plc4go/spi/testutils/DriverTestRunner.go | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/plc4go/spi/testutils/DriverTestRunner.go b/plc4go/spi/testutils/DriverTestRunner.go
index 487e1e859a..15a11e3a68 100644
--- a/plc4go/spi/testutils/DriverTestRunner.go
+++ b/plc4go/spi/testutils/DriverTestRunner.go
@@ -157,9 +157,7 @@ func (m DriverTestsuite) ExecuteStep(t *testing.T, connection plc4go.PlcConnecti
 	}
 
 	start := time.Now()
-	t.Logf("\n-------------------------------------------------------\n - Executing step: %s \n-------------------------------------------------------\n", step.name)
-
-	t.Logf("Handling step %s", step.stepType)
+	t.Logf("\n-------------------------------------------------------\n - Executing step (%s): %s\n-------------------------------------------------------\n", step.stepType, step.name)
 	switch step.stepType {
 	case StepTypeApiRequest:
 		switch step.payload.Name {