Implements an event provider that saves event notifications using the Logger infrastructure.

Namespace:  CuttingEdge.Logging.Web
Assembly:  CuttingEdge.Logging (in CuttingEdge.Logging.dll)

Syntax

Visual Basic (Declaration)
Public Class LoggingWebEventProvider _
	Inherits WebEventProvider
C#
public class LoggingWebEventProvider : WebEventProvider
Visual C++
public ref class LoggingWebEventProvider : public WebEventProvider
JavaScript
CuttingEdge.Logging.Web.LoggingWebEventProvider = function();

Type.createClass(
	'CuttingEdge.Logging.Web.LoggingWebEventProvider',
	WebEventProvider);

Remarks

The table below shows the list of valid attributes for the LoggingWebEventProvider:

AttributeDescription
loggingProvider The logging provider that will be used when writing an event. The value must contain the name of an existing logging provider. The default logging provider will be used when this attribute is omitted. This attribute is optional.
The attributes can be specified within the provider configuration. See the example below on how to use.

Examples

This example demonstrates how to configure the LoggingWebEventProvider in the web.config file. The configuration must contain a valid logging provider configuration. The DebugLoggingProvider is used in this example.
 Copy Code
  <?xml version="1.0"?>
  <configuration>
      <configSections>
          <section name="logging" type="CuttingEdge.Logging.LoggingSection, CuttingEdge.Logging"
              allowDefinition="MachineToApplication" />
      </configSections>
      <logging defaultProvider="DebugLoggingProvider">
          <providers>
              <add  
                  name="DebugLoggingProvider"
                  type="CuttingEdge.Logging.DebugLoggingProvider, CuttingEdge.Logging"
                  description="Debug logging provider"
                  threshold="Debug"
              />
          </providers>
      </logging>    
      <system.web>
          <healthMonitoring heartbeatInterval="0" enabled="true">
              <providers>
                  <add name="LoggingWebEventProvider"  
                      type="CuttingEdge.Logging.Web.LoggingWebEventProvider, CuttingEdge.Logging"  
                      loggingProvider="AspNetSqlLoggingProvider"
                      />
              </providers>
              <rules>
                  <add name="Custom Event Provider"
                       eventName="All Events"
                       provider="LoggingWebEventProvider"
                       profile="Default"
                      />
              </rules>
          </healthMonitoring>
      </system.web>
  </configuration>
  
See the <healthMonitoring> web.config configuration element for more information about configuring WebEventProvider classes and logging WebBaseEvent objects.

Inheritance Hierarchy

System..::.Object
  System.Configuration.Provider..::.ProviderBase
    System.Web.Management..::.WebEventProvider
      CuttingEdge.Logging.Web..::.LoggingWebEventProvider

See Also