Defines configuration settings to support the infrastructure for configuring and managing
Logging details. This class cannot be inherited.
Namespace:
CuttingEdge.LoggingAssembly: CuttingEdge.Logging (in CuttingEdge.Logging.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public NotInheritable Class LoggingSection _ Inherits ConfigurationSection |
| C# |
|---|
public sealed class LoggingSection : ConfigurationSection |
| Visual C++ |
|---|
public ref class LoggingSection sealed : public ConfigurationSection |
| JavaScript |
|---|
CuttingEdge.Logging.LoggingSection = function(); Type.createClass( 'CuttingEdge.Logging.LoggingSection', ConfigurationSection); |
Remarks
The LoggingSection class provides a way to programmatically access and modify
the LoggingProvider section in a configuration file.
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 | |
|---|---|
|
<configuration> <configSections> <section name="logging" type="CuttingEdge.Logging.LoggingSection, CuttingEdge.Logging" allowDefinition="MachineToApplication" /> </configSections> <logging defaultProvider="EventLogLoggingProvider"> <providers> <add name="EventLogLoggingProvider" type="CuttingEdge.Logging.WindowsEventLogLoggingProvider, CuttingEdge.Logging" threshold="Warning" source="MyWebApplication" logName="MyWebApplication" description="Windows event log logging provider" /> </providers> </logging> </configuration> | |
Inheritance Hierarchy
System..::.Object
System.Configuration..::.ConfigurationElement
System.Configuration..::.ConfigurationSection
CuttingEdge.Logging..::.LoggingSection
System.Configuration..::.ConfigurationElement
System.Configuration..::.ConfigurationSection
CuttingEdge.Logging..::.LoggingSection