共用方式為


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

備註

藉由正確使用這個屬性,您可以篩選系統可以記錄的錯誤。 在瞭解應用程式故障或瓶頸之後,您可能想要設計一個策略,以縮小您感興趣的錯誤範圍。

適用於

另請參閱