req icon indicating copy to clipboard operation
req copied to clipboard

Is it safe to call client.SetLogger(logger) concurrently?

Open GingerMoon opened this issue 1 year ago • 5 comments

Dear @imroc

My server is using zap logger. The logger is set to log correlation id of every inbound http request. My handlers for handling these inbound http requests use req http client. I want the call client.SetLogger(logger) concurrently on the same client (the looger logs the correlation id of different requests) so that the req http client also logs the correlation id.

Or should I create a new req client for different inboud http requests? Or, is it possible to write trace info into the dump file?

GingerMoon avatar Dec 05 '23 02:12 GingerMoon