I’m writing an ASP .NET MVC3 application and as application is expected to be secure, I need a good enterprise application logging architecture.
So I was seeking over existing loggin frameworks and picked the NLog. So at them moment I’m stuck with making DB schema for logs.
Does anyone have good experience in this area? It’s anticipate to log a set of actions such as user interactions with system objects, background works, user membership actions, payment transactions and so on.
I’ve been using NLog for a while now and i’m very happy with it. What I most like about NLog is that you can configure different loglevels to be written to different files and/or databases. It’s a very powerfull logging library.
For logging to the database you can use something like below in your config. This is similar to what I use at the company i’m working.
You can use the rules section to log different levels to different files, see example below;
EDIT: Added possible table layout for logging information.
The layout above is just an rough idea. It totally depends on what you want to log in this table. Though you have to try if it’s possible to add additional paramaters other than the ones used by NLog by default.