文本日志节正文包含应用于与文本日志节关联的作的零个或多个日志条目。 The format of a section body log entry includes an entry_prefix field, a time_stamp field, an event_category field, an indentation field, and a formatted_message field, as follows:
entry_prefix time_stamp event_category缩进formatted_message
节正文日志条目的最大长度(以字符为单位)为 336。
entry_prefix field
指示日志条目是错误消息、警告消息还是信息消息。 The entry_prefix field is always present and contains one of the strings that are listed in the following table:
| Entry_prefix field | 消息类型 |
|---|---|
| "!!! " | 错误消息 |
| "! " | 警告消息 |
| " " | 错误消息或警告消息以外的信息消息 |
time_stamp field
指示记录的事件发生时的系统时间。 The time_stamp field is optional and SetupAPI doesn't include a time stamp by default. However, SetupWriteTextLog supports including a time stamp in a log entry. The format of the time_stamp field is the same as the format of the time_stamp field that is described in Format of a Text Log Section Header.
event_category field
指示创建日志条目的 SetupAPI作的类别。 The event_category field is usually present, but isn't required. If the event_category field is present, it will contain one of the strings that are listed in the following table:
| Event_category field strings | SetupAPI operation |
|---|---|
| "...: " | Vendor-supplied operation |
| "bak: " | Backup data |
| "cci: " | 类安装程序或合作安装程序作 |
| "cpy: " | Copy files |
| "dvi: " | Device installation |
| "flq: " | 管理文件队列 |
| "inf: " | 管理 INF 文件 |
| "ndv: " | 新建设备向导 |
| "prp: " | 管理设备和驱动程序属性 |
| "reg: " | 管理注册表设置 |
| "set: " | General setup |
| "sig: " | 验证数字签名 |
| "sto: " | 管理驱动程序存储 |
| “ui: | “管理用户界面”对话框 |
| "ump: " | 用户模式 PnP 管理器 |
indentation field
Consists of a sequence of zero or more indentation units, where an indentation unit is a monospace string that contains five spaces. The indentation field is optional and SetupAPI doesn't include indentation by default.
SetupWriteTextLog supports changing the number of indentation units that are included in a log entry.
formatted_message field
包含适用于日志条目的特定信息。
记录的节正文条目取决于为日志设置的事件级别和为日志启用的类别级别。 有关这些设置的详细信息,请参阅 SetupAPI 日志记录注册表设置。
当 SetupAPI 创建一个分区来对应用于设备安装的作进行分组时,它还以递归方式对子节中的节正文日志条目进行分组。 SetupAPI 通过批注和缩进日志条目的方式来区分子节。 典型的设备安装部分的以下摘录中显示了一个此类小节。 该小节以日志条目“dvi: {Build Driver List}”开头,以日志条目“dvi: {Build Driver List - exit(0x00000000)}”结尾。 This subsection shows a typical sequence of log entries that include the entry_prefix, event_category, indentation, and formatted_message fields. 写入日志条目的 SetupAPI作也创建了缩进,并提供了格式化消息的内容。 此示例的事件级别设置为TXTLOG_DETAILS,并为此示例启用所有类别级别。
>>> [Device Install - PCI\VEN_104C&DEV_8019&SUBSYS_8010104C&REV_00\3&61aaa01&0&38]
>>> 2005/02/13 22:06:28.109: Section start
...
Additional section body log entries
...
dvi: {Build Driver List}
dvi: Enumerating all INFs...
dvi: Found driver match:
dvi: HardwareID - PCI\VEN_104C&DEV_8019
dvi: InfName - C:\WINDOWS\inf\1394.inf
dvi: DevDesc - Texas Instruments OHCI Compliant IEEE 1394 Host Controller
dvi: DrvDesc - Texas Instruments OHCI Compliant IEEE 1394 Host Controller
dvi: Provider - Microsoft
dvi: Mfg - Texas Instruments
dvi: InstallSec - TIOHCI_Install
dvi: ActualSec - TIOHCI_Install.NT
dvi: Rank - 0x00002001
dvi: DrvDate - 10/01/2002
dvi: Version - 6.0.5033.0
!!! inf: InfCache: Error flagging 1394.inf for match string pci\ven_104c&dev_8019
dvi: {Build Driver List - exit(0x00000000)}
...
Additional section body log entries
...
<<< [2005/02/13 22:06:29.000: Section end]
<<< [Exit Status(0x00000000)]