Logging for getting report in ASP.NET MVC 3 site
I have created a site using asp.net mvc3 and I have some action in my site like submitting special data, register entrance of people and ... I need to make system able to make report depend on users actions. so I need to save log information in database. my idea is to make 2 entities:
- general action des开发者_如何学Pythoncription
- log event
like below:
LogAction:
int id
string action
LogEvent:
int id
int LogActionID
int userID
string extraDescription
for this idea I have to create 2 other entity in my Entity framework. I want to know that is this idea ok or there is better idea for getting report of system?
I would add a DateTime property for the LogEvent, but all in all this is a good design. On an additional note, I'd recommend the use of some sort of AOP framework like PostSharp for the actual logging code
精彩评论