Closed thiagoloureiro closed 5 years ago
Hi, the HttpClient
instance is a singleton. It has the same lifetime as HttpGelfClient
which has the same lifetime as GelfLoggerProvider
which is registered as a singleton here.
Ah cool! Sorry didn’t noticed that! We can close it . Thanks for the good work in here mate, I’m starting to use this package in a big project ✌🏻
Sent from my iPhone
On 1 Oct 2019, at 3:20 pm, Matt Cole notifications@github.com wrote:
Hi, the HttpClient instance is a singleton. It has the same lifetime as HttpGelfClient which has the same lifetime as GelfLoggerProvider which is registered as a singleton here.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
No problem, good luck with the project! 👍
Hi @mattwcole ,
On HttpGelfClient shouldn't we use a static httpClient? To avoid opening and closing connections, even if it's disposed takes a while to close the connection
See:
https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/
Thanks!