Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Logging abstraction from .NET and PHP


Azure Websites collect diagnostic data from several sources, shipping them on a given storage account or the same virtual filesystem where they reside. We can categorize diagnostic data into the following two groups:

  • Application Diagnostics: Logs coming from the application code

  • Site Diagnostics: Logs coming from several infrastructure sources. They are as follows:

    • Web server logging: Logs for every arriving HTTP request

    • Detailed error messages: HTTP status codes that indicate failures

    • Failed request tracing: A complete IIS trace of components involved in processing requests

In this recipe, we focus on the application diagnostics group, collecting application logs in the virtual filesystem, Table Storage, and Blob Storage services.

Getting ready

This recipe assumes we have a valid Azure subscription and Visual Studio 2013 with the latest Azure SDK installed. We also use the Azure command prompt (or the developer command prompt for Visual Studio), an FTP...