ProcessModelSection.LogLevel 属性

定义

获取或设置一个值,该值指示记录到事件日志中的事件类型。

public:
 property System::Web::Configuration::ProcessModelLogLevel LogLevel { System::Web::Configuration::ProcessModelLogLevel get(); void set(System::Web::Configuration::ProcessModelLogLevel value); };
[System.Configuration.ConfigurationProperty("logLevel", DefaultValue=System.Web.Configuration.ProcessModelLogLevel.Errors)]
public System.Web.Configuration.ProcessModelLogLevel LogLevel { get; set; }
[<System.Configuration.ConfigurationProperty("logLevel", DefaultValue=System.Web.Configuration.ProcessModelLogLevel.Errors)>]
member this.LogLevel : System.Web.Configuration.ProcessModelLogLevel with get, set
Public Property LogLevel As ProcessModelLogLevel

属性值

ProcessModelLogLevel 值之一。 默认值是 Errors

属性

示例

下面的代码示例演示如何访问 LogLevel 属性。


// Get the current LogLevel property value.
ProcessModelLogLevel comLogLevel = 
    processModelSection.LogLevel;

// Set the LogLevel property to ProcessModelLogLevel.All.
processModelSection.LogLevel = ProcessModelLogLevel.All;
' Get the current LogLevel property value.
   Dim comLogLevel As ProcessModelLogLevel = _
   processModelSection.LogLevel

' Set the LogLevel property to ProcessModelLogLevel.All.
processModelSection.LogLevel = ProcessModelLogLevel.All

注解

通过正确使用此属性,可以筛选系统可以记录的错误。 了解应用程序的故障或瓶颈后,可能需要设计一种策略来缩小感兴趣的错误范围。

适用于

另请参阅