大网数据广告活动
Web服务器与PHP

Configuring HTTP Server API Error Logging

· 52CE 我爱测

The HTTP Server API error logging is controlled by three registry values under an HTTP\Parameters key.

The HTTP Server API error logging is controlled by three registry values under an HTTP\Parameters key located at:

HKEY_LOCAL_MACHINE
   System
      CurrentControlSet
         Services
            HTTP
               Parameters

Note:
The location and form of the configuration values may change in future versions of the Windows operating system.

A user must have Administrator/Local System privileges to modify the registry values, and view or modify the log files and the folder that contains them.

Configuration information in the registry values is read when the HTTP Server API driver is started. As a result, if the settings are changed the driver must be stopped and restarted to read the new values. This can be accomplished by using the following console commands:

net stop http

net start http

The log files are named by using the following convention:

httperr + SequenceNumber + .log

For example: "httperr4.log".

Log files are cycled when they reach the maximum size specified by the ErrorLogFileTruncateSize registry value, and the value cannot be less than one megabyte (MB).

If the configuration of error logging is invalid or any kind of failure occurs while writing to the log files, the HTTP Server API uses event logging to notify administrators that error logging did not take place.

Registry configuration values are described in the following table.

Registry Value Description
EnableErrorLogging A DWORD that can be set to 1 (means True) to enable error logging, or 0 (means False) to disable it. The default value is 1.
ErrorLogFileTruncateSize A DWORD that specifies the maximum size of an error log file, in bytes. The default value is one MB (0x100000). Note: The specified value cannot be smaller than the default value.
ErrorLoggingDir A String that specifies the folder under which the HTTP Server API places its logging files. The HTTP Server API creates a subfolder named "HTTPERR" under the specified folder into which the log files are placed. This subfolder and the log files receive the same permission settings, which means that Administrator and Local System Accounts have full access, while other users do not have access. If a folder is not specified in the registry, the default folder is the following: "%SystemRoot%\System32\LogFiles" Note: The ErrorLoggingDir string value must be a fully qualified path, but it can contain "%SystemRoot%".

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。