can Logger interface provide context?
Author: ynjgitCreated Mar 31, 2026Updated Aug 23, 2026
can Logger interface provide context?, we can reuse the resty.Client , but different context with Request.SetContext, so we can print the ctx infomation (eg: trace_id).
like below: // Logger interface is to abstract the logging from Resty. Gives control to // the Resty users, choice of the logger. type Logger interface { Errorf(ctx context.Context, format string, v ...interface{}) Warnf(ctx context.Context, format string, v ...interface{}) Debugf(ctx context.Context, format string, v ...interface{}) }
Source: go-resty/resty