Geeks With Blogs
AngelEyes on .Net Tips, tricks and WTFs about Asp .Net, SQL Server and the likes. March 2015 Entries
WebAPI Exception Logging
Just found out - very easily - a simple way to add logging (via log4net) to my .Net Web API. Thanks to a "code friendly" post.The whole article is full of useful information, though in this instance I focused on global logging alone.This was accomplished (again, easily) by adding the following to global.asax.cs at app-start or a function called from it:GlobalConfiguration.Conf... new GlobalExceptionLogger());And adding the class itself: internal class ......

Posted On Tuesday, March 10, 2015 10:24 AM

Copyright © AngelEyes | Powered by: GeeksWithBlogs.net