diff options
author | xengineering <me@xengineering.eu> | 2023-07-01 19:55:11 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-01 19:55:11 +0200 |
commit | 59b89cfac8c3e0402b8e3c27cca8990674b8a5e3 (patch) | |
tree | 3319ff0764746484c0923282fc0b9aa0fce502ef /xmpp/log.go | |
parent | 0882d7861ed764cc856f2a6b4572630ec12751bf (diff) | |
download | limox-59b89cfac8c3e0402b8e3c27cca8990674b8a5e3.tar limox-59b89cfac8c3e0402b8e3c27cca8990674b8a5e3.tar.zst limox-59b89cfac8c3e0402b8e3c27cca8990674b8a5e3.zip |
Implement byte-based logging for TX
Using an io.MultiWriter it is trivially possible to write encoded tokens
to the TCP channel aswell as to stdout.
The disadvantage is that it is not possible to inject prefix data like
the so far used `C: ` only for stdout and not for the TCP channel. Such
a prefix is not wanted in the TCP channel and thus not wanted for both.
The solution to get a nice log is to implement a transparent logging
middleware which gets the raw TX stream and inserts a prefix at each
line before sending to stdout.
Diffstat (limited to 'xmpp/log.go')
0 files changed, 0 insertions, 0 deletions