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/13 08:58:02 UTC

[plc4x] branch develop updated: test(plc4go/cbus): log error on trace on all units or all attributes

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 3f9249ca68 test(plc4go/cbus): log error on trace on all units or all attributes
3f9249ca68 is described below

commit 3f9249ca68a2ee1a95aa56f8db5edf979c38d439
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Tue Jun 13 10:57:53 2023 +0200

    test(plc4go/cbus): log error on trace on all units or all attributes
---
 plc4go/internal/cbus/Browser.go | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/plc4go/internal/cbus/Browser.go b/plc4go/internal/cbus/Browser.go
index ed23370056..9fbffe99e4 100644
--- a/plc4go/internal/cbus/Browser.go
+++ b/plc4go/internal/cbus/Browser.go
@@ -108,9 +108,10 @@ func (m Browser) BrowseQuery(ctx context.Context, interceptor func(result apiMod
 				m.log.Trace().Msg("got a response")
 				timeoutCancel()
 				if err := requestResult.GetErr(); err != nil {
-					if !allUnits && !allAttributes {
-						event.Err(err).Msgf("unit %d: Can't read attribute %s", unitAddress, attribute)
+					if allUnits || allAttributes {
+						event = m.log.Trace()
 					}
+					event.Err(err).Msgf("unit %d: Can't read attribute %s", unitAddress, attribute)
 					continue unitLoop
 				}
 				response := requestResult.GetResponse()