algoliasearch-client-csharp
algoliasearch-client-csharp copied to clipboard
Need a way to add custom logging for the Http Request and Response
It could be critical to log the http requests and responses from the http requests. Current, there is hard code LogHelper.LogToFile(request.Body) in the AlgoliaHttpRequester.cs class's SendRequestAsync method and this classs is internal.
There isn't an easy way to inject in a custom logger.
Hello,
There isn't an easy way to inject in a custom logger.
That's true - it's something we could look at. cc @TomKlotzPro
Current, there is hard code LogHelper.LogToFile(request.Body) in the AlgoliaHttpRequester.cs class's SendRequestAsync
You can enable this logger by setting the ALGOLIA_DEBUG
env variable if you need it for debugging purposes.
Hello,
A new version of the client (Alpha) is now released on Nuget. You can now inject a LoggerFactory
. If you want the response you have to be in Trace
log level.
If you have time, we need customer feedback about this new version. It's still not GA so you may not want to use it in production.
There is no more deps on Newtonsoft, all Algolia APIs are now available (Insights, Recommend, Query Perso, ...) and all models and routes are synced.
To help you migrate, there is a Migration guide.
Happy to help in your migration process !