I have some basic Web API code that uses Ninject. Till now I wasn't really logging anything but just sending BadRequest object in case something is wrong. With that code working fine, I want to add some logging (could be just info, errors or debug if need be) and I was using this article as my guideline. http://devthings.com.ua/logging-in-asp-net-web-api-using-log4net-and-elasticsearch/ This article uses Unity framework and uses MVC rather than API code so I am unable to translate that code into Ninject properly. I don't understand step # 4 where he is setting up UnityFilterProvider, what exactly does Unity do here? Whats the equivalent in Ninject?
Asked
Active
Viewed 150 times
1
-
1See [Constructor Dependency Injection WebApi Attributes](https://stackoverflow.com/a/28365933). – NightOwl888 Mar 14 '18 at 20:14
-
This should help as to how to setup a filterprovider for ninject linked to an attribute put on an action https://stackoverflow.com/a/48647030/1236044 – jbl Mar 15 '18 at 10:30