tigase / tigase-server

(M) Highly optimized, extremely modular and very flexible XMPP/Jabber server
https://tigase.net
GNU Affero General Public License v3.0
326 stars 106 forks source link

How can I implement the use of MDC in tigase logs? Any sugestions? #174

Closed FelipeIregui closed 1 year ago

FelipeIregui commented 2 years ago

I have a problem with… Difficulties using MDC in tigase logs. trying to integrate a correlation id in logs.

Details (please complete the following information):

woj-tek commented 2 years ago

I assume that MDC stands here for Mapped Diagnostic Context?

Currently, we use JUL logger and from what I read it doesn't support MDC so adding support for it would require complete overhaul of logging in Tigase. What's more, considering that Tigase is multi-component and multi-threaded, passing correctly id between would be problematic.

Though, we do include packet in most of the log entries so tracking packet processing (using it's ID) should be fine (even though not ideal).

FelipeIregui commented 2 years ago

Yeah :). Perfect thank you, will try the tracking on each packet logs.