Implements an event provider that saves event notifications using the Logger
infrastructure.
Namespace:
CuttingEdge.Logging.WebAssembly: 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:
| Attribute | Description |
|---|---|
| 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. |
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.
See the <healthMonitoring> web.config configuration element for more information about
configuring WebEventProvider classes and logging WebBaseEvent objects.
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> | |
Inheritance Hierarchy
System..::.Object
System.Configuration.Provider..::.ProviderBase
System.Web.Management..::.WebEventProvider
CuttingEdge.Logging.Web..::.LoggingWebEventProvider
System.Configuration.Provider..::.ProviderBase
System.Web.Management..::.WebEventProvider
CuttingEdge.Logging.Web..::.LoggingWebEventProvider