Skip to content

built-in bridge should generate separate logs for debugging connection issues #3459

@jarhodes314

Description

@jarhodes314

Is your feature improvement request related to a problem? Please describe.
Debugging a Cumulocity core issue with thin-edge recently has led me to see how useful the existing mosquitto logs are for explaining what is going on with MQTT communication (with the correct settings in mosquitto, cat /var/log/mosquitto/mosquitto.log | grep Cumulocity will show all the packets sent to/from the bridge). In the implementation of the built-in bridge, we've generally avoided logging in too much detail since that can pollute the mapper logs which contain a lot of other detail. I initially developed the bridge with concerns around debugging thin-edge.io specifically, but the bridge should also enable us to debug communication problems arising from the cloud too.

Describe the solution you'd like
I think the built-in bridge could perform detailed logging in a separate file. It would make sense to give the user some control over this (/the ability to disable it entirely since it could occupy rather a lot of disk space). There should probably be some basic logs in the main mapper logs, like what we have now which gives a broad indication of bridge health/backoffs in reconnecting, but doesn't give packet-by-packet descriptions of what's going on unless debug level logging is enabled.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions