Share via


desktop10:CustomDesktopEventLog

定義自訂事件記錄檔。

元素階層

<套件>

    <擴充功能>

         <desktop10:Extension>

              <desktop10:CustomDesktopEventLog>

Syntax

<desktop10:CustomDesktopEventLog
  CustomEvenLogName = 'An optional string with a value between 1 and 32767 characters in length that cannot start or end with a whitespace character. May contain whitespace characters in between the first and last values.'
  DisplayNameFile = 'An optional string with a value between 1 and 256 characters in length that must end with ".dll" and cannot contain these characters: <, >, :, ", |, ?, or *.'
  DisplayNameID = 'An optional unsigned integer value. A number between -2147483648 and 2147483647.'
  MaxSize = 'An optional unsigned integer value. A number between -2147483648 and 2147483647.'
  PrimaryModule = 'An optional string with a value between 1 and 32767 characters in length that cannot start or end with a whitespace character. May contain whitespace characters in between the first and last values.'
  Retention = 'An optional unsigned integer value. A number between -2147483648 and 2147483647.' >

  <!-- Child Elements -->
  desktop10:CustomEventSource{0, 16384}

</desktop10:CustomDesktopEventLog>

答案

{} 特定出現的範圍

屬性和元素

屬性

屬性 描述 資料類型 必要 預設值
CustomEventLogName 自訂事件記錄檔的名稱。 用來作為登錄機碼名稱。 長度介於 1 到 32767 個字元之間的選擇性字串,長度不能以空白字元開頭或結尾。 可能包含介於第一個和最後一個值之間的空白字元。 No
DisplayNameFile DLL 檔案,其中包含要用於此事件記錄檔名稱的語言字串。 長度介於 1 到 256 個字元之間的選擇性字串,其長度必須以 .dll 結尾,且不能包含下列字元: < 、、 ":|>? 或 。 * No
DisplayNameID DisplayNameFile中要用於事件記錄檔名稱之語言字串的識別碼。 選擇性不帶正負號的整數值。 -2147483648 與 2147483647 之間的數位。 No
MaxSize 事件記錄檔的大小上限,以位元組為單位。 選擇性不帶正負號的整數值。 -2147483648 與 2147483647 之間的數位。 No
PrimaryModule 子機碼的名稱,其中包含事件來源之子機碼中專案的預設值。 長度介於 1 到 32767 個字元之間的選擇性字串,長度不能以空白字元開頭或結尾。 可能包含介於第一個和最後一個值之間的空白字元。 No
保留 指定記錄到達 MaxSize時,事件是否會被覆寫或捨棄。 如果此值為 0,則一律會覆寫事件的記錄。 如果此值是任何非零值,則永遠不會覆寫記錄。 當記錄檔達到其大小上限時,您必須手動清除記錄檔;否則,會捨棄新的事件。 預設值為 0。 選擇性不帶正負號的整數值。 -2147483648 與 2147483647 之間的數位。 No

子元素

子項目 描述
desktop10:CustomEventSource 定義自訂事件記錄檔內的事件來源。

父元素

父元素 描述
desktop10:Extension 宣告應用程式的擴充點。

備註

如需自訂事件記錄的詳細資訊,請參閱 Eventlog 金鑰

規格需求

Item
desktop10 http://schemas.microsoft.com/appx/manifest/desktop/windows10/10
OS 最低版本 Windows 11版本 22H2 (組建 22621)