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...