I'm currently working on a requirement to implement logging in multiple projects and require to develop a enterprise level logging application that can be using in n number of projects.
Present Scenario: What currently is happening is for every solution comprises of 3-4 projects, a logging project was developed and Logger class was created there that can be used within the whole solution. Is writes the logs as text file on the C:\ drive. There are around 5 solutions like that where 5 common projects are created and used within.
Suggestion Scenario: I'm thinking of creating a API(web service) either WCF or WebAPI that performs the logging and can be used in all these 5 solutions. The big advantage is the loose coupling of logger from the solution and also a lot of code reduction since no more 5 logging projects are required.
One more requirement to do store logs in the database instead of text files so that in future a Web Application can be developer that communicates to the database and displays the logs instead of manually looking for it inside the text files.
Doubts: Is going with the API way better than the class libraries already created? What about the latency issues as I have to think it the enterprise level. Can I stick with Common project for logging and make it as a .dll that can be referenced in all the 5 solutions. Doing so, I can be able to reduce the 5 Common projects created earlier.
Any suggestions, feedback is highly appreciated for it!