Open harism opened 4 hours ago
Sounds reasonable. The only caveat I see is that we should not include the payload in the logs ...
Do you mean that payload should not be logged at all or are you worried about the length instead?
In case of the length this default MessageTracer use seems to limit payload output to max 32 characters long.
Shortly the idea is, which I'm willing to implement if agreed so;
Enabling this flag will add INFO level logs from default MessageTracer which look similar to this example;
Purpose is to see message details especially in situations where they do not map into uri-paths which Hono implements and in these rare cases can be difficult to understand why the message doesn't even reach to Hono and Californium discards it already.
Usually that would mean that the client does not follow CoAP specification closely enough, and this flag is kind of a debug mode where every message gets logged with details it carries.
However there is always the security aspect to consider too with this kind of features.