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 the
Info 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
To read more click here: