Rapid7 Blog

Making Azure, ASP.NET, and MVC Logging Look Easy

POST STATS:

SHARE

Coming straight to you from our customer success team is a great story from one of our customers, Max Vasilyev, who is a Senior Developer at an oil servicing company in Aberdeen, Scotland. A few months ago, Max deployed a multi-tenant HR application on Microsoft Azure developed in ASP.NET, MVC, and Autofac.

With more than 180,000 lines of code, this application uses token based logging to create a new Logentries log per customer. Unfortunately for Max, there wasn’t an easy way to assign a separate token for each of his customers so Max crafted up a unique wrapper for nlog that would do the trick automatically. The key part to Max’s code is the GetLogger() function. The beauty of the code is that when the customer creates a new Logentries Service, it checks to see if one already exists and if not, will create a new one.

Max’s blog post brings to light a best practice mentality to institute prior to deploying your application across Azure. He details why he created the custom wrapper, how to use it, and how to benefit using nlog with Logentries on Azure. Not only does Max show us how he constructed the nlog wrapper, but he provides the code directly on his site and walks his readers through setting it up and using it. Bottom line — you can get full deployment automation across Azure with .NET applications and integration into Logentries.

We love highlighting unique use cases about how our customers are using Logentries so, as always, we want to hear about interesting approaches or feedback. Feel free to reach out to us on Twitter, Reddit, or email with your stories.