Eksportér (0) Udskriv
Udvid alt
EN
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.

Use Trace Messages in an Azure Application

Updated: August 18, 2014

The Trace class allows you to instrument your application. You can receive informative messages from your running application that can help diagnose problems or analyze performance. Before you complete the following procedure, you must configure a TraceListener. To do this, see Configure the TraceListener in an Azure Application.

  1. Open the source file for your application. For example, the <RoleName>.cs file for the worker role or web role.

  2. Add the following using statement if it has not already been added:

    using System.Diagnostics;
    
  3. Add Trace statements where you want to capture information about the state of your application. You can use a variety of methods to format the output of the Trace statement. For more information, see How to: Add Trace Statements to Application Code.

  4. Save the file.

See Also

Vis:
© 2014 Microsoft