Logging with the .NET backend for Azure Mobile Services!!!!!!!!

Posted on Updated on

On the node.js version of mobile services, logging was done mostly via the node’s console object. In any of the server scripts you could call console.[log|warn|error] and when that script was executed you could go to the “logs” tab in the portal to see them.

In the .NET backend you still have the same capabilities, but there are some new features and quirks which one should be aware to get the best logging experience in that new backend. Let’s go over them here.

Logging when running locally

This is a very simple example of logging in the .NET backend. If we write this controller class, we can use the Logproperty in the Services member of the TableController<T> class to write to the Azure logs. Notice that theInfo method in the Log property used below is an extension method and you need to add a ‘using System.Web.Http;’ statement to see it (same for the Debug / Warn / Error methods).

To read more click here:



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s