Log records are critical to any server. This is no exception for IIS servers. In Windows 7, IIS logging has been greatly improved compared to 2003. The operating system administrator has more options than the log format or other optional items. As shown in, this is the basic page for IIS logging configuration management.
IIS logs
In Windows 7, IIS logging should be considered as required by ISS rather than optional components. This is mainly because log files play a key role in managing IIS servers. For example, if the IIS server is under a security threat, it can exploit the log file and perform an exclusive audit on the internal details contained in it. If the IIS server fails, you can use the information recorded in this log file to check the maintenance process and identify system problems. The author will introduce some new features of IIS logging in Windows 7 compared with windows, and help you deploy a handy log management mode.
1. select an appropriate log record level.
In IIS7.0, the system administrator can select an appropriate log record level as needed. For example, you can manage log records at the server level or at the website, WEB application files, or directory level. The specific implementation depends on the needs of the system administrator. However, you must note that the supported log file formats vary depending on the implementation level. For example, at the "server" level, there are only two supported log formats, W3C and binary. If you select "website" to implement log management, there are three supported log formats: IIS, NCSA, and W3C. In addition, if the system administrator finds that these formats are not met, they can customize the formats they need. Therefore, when selecting the log record level, in addition to the level at which the log management is convenient and secure, you also need to combine your favorite log format. I personally like to manage logs at the website level. It is a waste of time to deploy IIS services on one server. That is to say, there may be multiple application services on the same server. To distinguish logs from logs of other application services and server operating systems, we recommend that you manage logs at the website level. Of course, there is no practical difference in the log Content at what level of log management. It depends on the server deployment and the work habits of the system administrator.
2. select an appropriate format for the log record.
If you select the website level to manage logs, there are multiple options for this log format. Most importantly, the system administrator can select the IIS log format. The IIS log format is text-based logs. Similar to W3C log format, HTTP. SYS is used for control. However, this IIS log format is a core mode process. Previously, log records were managed in user mode. There is a big change between the two. The Hypertext Transfer Protocol listener is implemented as the kernel-mode device driver named HTTP. SYS. HTTP. SYS is an important part of the Windows network subsystem. In earlier versions, when creating a website in IIS, use HTTP. SYS to register the site, and then HTTP. SYS sends the Web request to the user mode process of the website running. At the same time, HTTP. SYS also sends the response back to the client. In addition to retrieving stored responses from its internal cache, HTTP. SYS does not process the requests it receives. Therefore, application-specific code will never be loaded into kernel mode. However, some system administrators want HTTP. SYS to run in core mode. In this case, the IIS log format is used. In addition, IIS is a text-based log record, which is different from a binary log record. You can directly view the log information through a text browser or other tools. Therefore, reading is more convenient.
Of course, log files are stored in the same format. Therefore, the log file format does not affect the actual log management value. However, for the convenience of future management and maintenance, it is best for the author to set up a system administrator to select a proper log format based on his work habits.
3. select an appropriate encoding format.
Generally, IIS log files are encoded in two formats: UTF-8 and ANSI. Among all character sets, ANSI is famous. However, this encoding format is specifically designed for English. Garbled characters are used to store other languages. For example, it is not very good for Chinese. In order to solve this problem, we propose a new encoding format, that is, UTF-8. This is a type of UNICODEd character encoding. If UNICODE characters are represented by 2 bytes, it is likely to require 3 bytes to be encoded into the UTF-8, And if UNICODE characters are represented by 4 bytes, it may require 6 bytes to be encoded into the UTF-8. UTF-8 encoding can be quickly read and written through shielding bit and shift operations. When comparing strings, strcmp) and wcscmp) return the same results, making sorting easier. Byte FF and FE will never appear in UTF-8 encoding, so they can be used to indicate UTF-16 or UTF-32 text. The UTF-8 is byte order independent. Its byte order is the same in all systems.