EventLogger is a simple way to log everything in Asp.Net Mvc projects that use Entity Framework Code First.
By using this library you will have the following features in your project:
To use EventLogger in your mvc application first you need to get this source and build it, then refrence bellow library inside your project:
Now you need to add bellow code lines to your global.asax:
EventLoggerConfig.Init(); GlobalFilters.Filters.Add(new EventLogFilter()); GlobalFilters.Filters.Add(new ErrorLogFilter());
And add the following lines to your application web.config:
<appSettings> <add key="EventLoggerConnectionStringName" value="YourConnectionStringName" /> . . . </appSettings> <modules> <add name="ErrorLogModule" type="EventLogger.Mvc.ErrorLogModule" /> </modules>
Thats all we need to do! Now if run your project you should see that a table called EventLogs is created in your database. Click on your application menu links and do some activity and see logs in EventLogs table. Try to throw errors and see their logs in the EventLogs table.
To view list of logs and search and filter them enter the following url in your browser : /EventLogs
And you should see logs page that allow us to filter by Event or Error types.
I hope it helps. Have fun.
DNTCommon.Web.Core provides common scenarios' solutions for ASP.NET Core 3.x applications.
Enrich logs with client IP and UserAgent.
Task management application based on .NET 6 with DDD, CQRS, Event Sourcing and Testing Concepts
Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data.
Dynamic Permission Samples in ASP.NET Core and ASP.NET MVC 5.
پلتفرم خودکار , پلتفرم آنلاین و تحت وب رایگان و متن باز ساخت وبسایت بر پایه دات نت فریم ورک
EF Core Second Level Cache Interceptor
SEO Checker and Recommander Plugin (like wordpress Yoast) for ASP.NET Core.