Book Image

Learning Microsoft Azure

By : Geoff Webber Cross, Geoff Webber-Cross
Book Image

Learning Microsoft Azure

By: Geoff Webber Cross, Geoff Webber-Cross

Overview of this book

Table of Contents (19 chapters)
Learning Microsoft Azure
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Application logging


Within our websites, we can use the System.Diagnostics.Trace object to help write trace information to the Azure website trace listeners, which write data to the file, table storage, and blob storage. If implemented properly, tracing is useful to help diagnose problems with errors and performance. In normal operations, we can log errors at the Error trace level to minimize storage and performance impact; however, if we experience difficulties, we can raise the LOGGING LEVEL value to show us more detailed information.

Visual Studio's Server Explorer only allows us to configure file logging, but we have full control of the trace listener options in the portal:

Here, we can enable logging to the file, table storage, and blob storage, and control the LOGGING LEVEL value for each option. There are five LOGGING LEVEL options, which correspond to the following trace levels:

  • Off: This indicates that nothing is logged

  • Error: This indicates 1 or lower logged

  • Warning: This indicates...