共用方式為


設定檔

表示問題類別和收集器專案的集合。

元素階層

Syntax

<Profile Id          = IdType
         Name        = string
         Description = string
         Base        = string
         LoggingMode = "File" | "Memory"
         DetailLevel = "Verbose" | "Light"
         Strict      = boolean
         Internal    = boolean
         Default     = boolean>

  <!-- Child elements -->
  ProblemCategories,
  Collectors

</Profile>

屬性和項目

屬性

屬性 描述 資料類型 必要 預設
Id 唯一識別設定檔。 必須至少有一個字元且不能包含冒號或空格的字串。 Yes
名稱 指出設定檔的名稱。 string
說明 指出設定檔的描述。 string Yes
基地 表示設定檔的基底。 字串 No
LoggingMode 指出 WPR 寫入記憶體或循序檔案。 此屬性可以有下列其中一個值:
  • 檔案
  • 記憶體
檔案
DetailLevel 指定設定檔定義是用於計時追蹤 () Light 還是分析追蹤 Verbose () 。 此屬性可以有下列其中一個值:
  • 「詳細資訊」
  • 淺色
Yes 「詳細資訊」
Strict 指出提供者或收集器失敗會導致啟動作業失敗。 如果此屬性設定為 false ,即使某些收集器或提供者失敗,啟動作業仍會成功。 至少一個收集器及一個提供者必須成功,作業才能繼續。 如果此屬性設定 true 為 ,則會以警告的形式提供無法啟動之提供者或收集器的相關資訊,而不是錯誤。 boolean No false
內部 指出設定檔是否為內部。 boolean No false
預設值 指出設定檔是否為預設設定檔。 boolean No false

子元素

元素 描述 需求
ProblemCategories 表示問題類別的集合。 必要,剛好是 1。
Collectors 表示設定檔的收集器集合。 必要,剛好是 1。
TraceMergeProperties 表示追蹤合併屬性的集合。 選擇性,完全是 1。

父項目

元素 描述
設定檔 表示收集器、提供者和設定檔的集合。

備註

每個 .wprp 檔案通常至少包含兩個設定檔定義:每個記錄模式各一個。 例外狀況是只能將轉換設定檔記錄到檔案,因此這些設定檔的 .wprp 檔案只能包含一個設定檔定義。 每個 .wprp 檔案最多可以包含四個設定檔:每個記錄模式和詳細資料層級的組合各一個。 單一 .wprp 檔案中的所有設定檔都必須具有相同的 Name 屬性值。

結合NameDetailLevelLoggingMode屬性的值,並以句號分隔,以建構Id屬性值,如下列範例所示。

根據預設,衍生設定檔具有基底設定檔的所有屬性。 您可以藉由在衍生設定檔中明確指定它們來覆寫這些專案。 如需詳細資訊,請參閱繼承

範例

下列程式碼範例顯示設定檔定義。

<Profile
  Id="Example.Light.File"
  Name="Example"
  DetailLevel="Light"
  LoggingMode="File"
  Description="Example profile">
  <ProblemCategories>
    <ProblemCategory
      Value="First Level Triage"/>
  </ProblemCategories>
  <Collectors>
    <SystemCollectorId
      Value="WPRSystemCollector">
    <SystemProviderId
      Value="system-provider"/>
    </SystemCollectorId>
    <EventCollectorId
      Value="WPREventCollector">
      <EventProviders>
        <EventProviderId
          Value="Win32K-provider"/>
        <EventProviderId
          Value="Search-Core-provider"/>
      </EventProviders>
    </EventCollectorId>
  </Collectors>
</Profile>

收集器和提供者也可以在設定檔定義內就地定義。

元素