How to decrease verbose informations #455
-
when the url is not reachabble,resty will print a lot of errors like: ERROR RESTY Get "*****": read tcp *** i wanna know how to decrease or close these outputs |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
To override the default logger, use *Client.SetLogger. |
Beta Was this translation helpful? Give feedback.
-
i found the SetLogger(l Logger) *Client function,the Logger has 3 types: from the picture, i got a error,so , can i close the output in my picture by using resty.setlogger(Logger.Errorf) ? |
Beta Was this translation helpful? Give feedback.
-
You need to build your own type that satisfies the Logger interface. |
Beta Was this translation helpful? Give feedback.
-
can u show me a example |
Beta Was this translation helpful? Give feedback.
-
@Nyx2020 You could do something similar to what Resty does internally and override. Lines 44 to 66 in b8f7c11 |
Beta Was this translation helpful? Give feedback.
To override the default logger, use *Client.SetLogger.