Manages logging in an application. This class cannot be inherited.

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

Syntax

Visual Basic (Declaration)
Public NotInheritable Class Logger
C#
public static class Logger
Visual C++
public ref class Logger abstract sealed
JavaScript
CuttingEdge.Logging.Logger = function();

Type.createClass(
	'CuttingEdge.Logging.Logger');

Examples

This example demonstrates how to specify values declaratively for several attributes of the Logging section, which can also be accessed as members of the LoggingSection class. The following configuration file example shows how to specify values declaratively for the Logging section.
 Copy Code
  <?xml version="1.0"?>
  <configuration>
      <configSections>
          <section name="logging" type="CuttingEdge.Logging.LoggingSection, CuttingEdge.Logging"
              allowDefinition="MachineToApplication" />
      </configSections>
      <connectionStrings>
          <add name="SqlLogging"  
              connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Logging;" />
      </connectionStrings>
      <logging defaultProvider="SqlLoggingProvider">
          <providers>
              <add  
                  name="SqlLoggingProvider"
                  type="CuttingEdge.Logging.SqlLoggingProvider, CuttingEdge.Logging"
                  fallbackProvider="WindowsEventLogLoggingProvider"
                  threshold="Information"
                  connectionStringName="SqlLogging"
                  description="SQL logging provider"
              />
              <add  
                  name="WindowsEventLogLoggingProvider"
                  type="CuttingEdge.Logging.WindowsEventLogLoggingProvider, CuttingEdge.Logging"
                  threshold="Warning"
                  source="MyWebApplication"
                  logName="MyWebApplication"
                  description="Windows event log logging provider"
              />
          </providers>
      </logging>
      <system.web>
          <httpModules>
              <add name="ExceptionLogger"  
                  type="CuttingEdge.Logging.Web.AspNetExceptionLoggingModule, CuttingEdge.Logging"/>
          </httpModules>
      </system.web>
  </configuration>
  

Inheritance Hierarchy

System..::.Object
  CuttingEdge.Logging..::.Logger

See Also