You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If logrus is passed to the serverparams in server.go, the pkg logger is become a proxy and log all the log to logrus via the logrushook.
The issue is that if we set the reportCaller, the result is not correct as the detected caller is from the hook in logging.go. Below is an example result:
The expected result is from the place pkg logger is called, like.
The text was updated successfully, but these errors were encountered:
The issue affects logs logged against the pkg logger directly (i.e. logs logged from within sysl-go itself). The issue is that logrus overwrites the caller directly in the logrus.Entry.log method, making it impossible to set a custom value beforehand. This change cannot be cleanly[1] supported without a logrus change.
[1] A workaround would be to SetReportCaller to false before calling logrus.Entry.log then setting it to true afterwards but the logrus logger is mutable which would result in inconsistent logging through multiple threads.
I'm going to deprioritise this. The caller is logged as an attribute so the information isn't lost, just not consistent with logs logged directly against logrus.
If logrus is passed to the

serverparams
inserver.go
, the pkg logger is become a proxy and log all the log to logrus via thelogrushook
.The issue is that if we set the
reportCaller
, the result is not correct as the detected caller is from the hook inlogging.go
. Below is an example result:The expected result is from the place pkg logger is called, like.

The text was updated successfully, but these errors were encountered: