Log records for any servers, are essential. For the IIS server is no exception. In Windows7 operating system, compared to 2003, the logging for IIS is a big improvement. Just log format, or some other option, the operating system administrator more choices. As shown below, IIS logging configuration management is the basic page.
In Windows7 operating system, IIS logging ISS should be regarded as necessary rather than optional components. This is mainly because the IIS server log files for management is a very crucial role. If the IIS server in case of security threats, we can use the log file and contains the details of the internal review of the implementation of Question-row. As to the IIS server after a failure can also use this log file to check the information recorded in the maintenance process and identify system problems. I gave you here about Windows7 operating system compared to Windows2003 IIS logging some of the new operating system features, and help you deploy a handy log management.
First, select the appropriate logging level
In IIS7.0 version, system administrators can choose according to their own needs appropriate logging level. If you can log on at the server level records management, also available on the website, WEB application file or directory level to achieve it. Specifically to achieve at that level, mainly to see the system administrator’s needs. But note that the different levels of its implementation, supported log file format is different. If the “server” level to achieve, then log formats it supports only two, namely “W3C” format and binary format. And if you select the “Site” level log management to achieve, then it supports three log formats, namely IIS, NCSA, W3C format. And the system administrator if you think that these formats are not met, can be “custom” way to customize the format they need.Therefore, the choice of logging level, apart from the need to consider at what level the log management more convenient and safe, but also need to combine their favorite log format. I personally like to log on at the site level management. Because a single server, if only deployed if the IIS service, may be wasted. In other words, on the same server may have multiple applications. For other applications with the operating system and server logs to distinguish, I would suggest that you at the site level management. Of course, at what level for log management, for the contents of the log difference is not practical.Mainly to see the server’s system administrator to deploy and work habits.
Second, to select the appropriate format for logging
If you choose to manage the logging site level, then this log format options. Most importantly, the system administrator can choose the IIS logging format. The IIS logging format is text-based logging. Similar with the W3C logging formats are controlled by HTTP.SYS. However, the IIS logging format is a kernel-mode process. The previous log records are managed through the user mode. Between a relatively large change.Hypertext Transfer Protocol is implemented as a listener called HTTP.SYS kernel mode device drivers. HTTP.SYS Windows network subsystem is an important part. In previous versions, when creating a Web site in IIS, use HTTP.SYS registration site, and then passes the request to HTTP.SYS the Web site is running in user mode process.Meanwhile HTTP.SYS will respond back to the client. In addition to its internal cache memory to retrieve the response other than, HTTP.SYS not handle the request it received.Therefore, the application-specific code is never loaded into the kernel mode. However, some system administrators want to be able to HTTP.SYS core mode. At this point you need to use IIS log format. In addition IIS is text-based logging, logging with a different binary format, directly through a text browser and other tools to view the log information.Therefore, it is also more convenient to read.
Of course, the log file format, its stored contents are the same. So the log file format and does not affect the actual management of the log value. However, for the future management and maintenance convenience, I set up the system administrator is best according to their work habits to select the appropriate log format.
Third, select the appropriate encoding format
Under normal circumstances, IIS log file encoding format, there are two, namely UTF-8 and ANSI formats. In all of the character set, although more famous ANSI. However, this can be said encoding format designed specifically for English. Used to store other languages will be garbled situation. As for the Chinese to support the not very good. To solve this problem, specifically proposed a new coding format, UTF-8. This is a UNICODEd a variable-length character encoding. If the 2-byte UNICODE characters that are encoded in UTF-8 is likely to require 3 bytes, and if the 4-byte UNICODE characters that are encoded in UTF-8 may require 6 bytes. UTF-8 encoding mask bit and the shift can be quickly read and write operations. String comparison strcmp () and wcscmp () return the same result, thus making sorting easier. Byte FF and FE in the UTF-8 encoding will never appear, so they can be used to indicate UTF-16 or UTF-32 text. UTF-8 is byte order independent. It’s all systems in the byte order is the same.
The format of these character sets for some system administrators may be a bit esoteric.In fact, system administrators do not understand so well. Only need to understand a principle. If the log shows that if you are in English, then there will not be using ANSI encoding problem. However, if the log will continue to exist in other languages, then may be garbled. To this end I propose, or the use of UTF-8 encoding format as well. After all, their support for English is very good. Once and for all this might as well be set to UTF-8 format as well. So after reading the log and then encountered trouble garbled.
Fourth, select the appropriate log file rollover mechanism
If the IIS Logs are kept in a file, the file will be very long obviously. At that time, view records, when will be very troublesome. This is best able to split the log file, split into a small file. This convenient and follow-up inquiries and reading. Windows 7 download operating system in the IIS log, the log files provide a lot of rolling updates. If time can create a new log file. If by day, week or month to achieve the log file rollover. Under normal circumstances, on a monthly basis to update. If the IIS server to access more frequently, are able to shorten the log file rollover time interval. If you can adjust the time interval of one week or a day, and so on. How much of this time interval in the end as well, mainly to see the number of records. If more than the number of log records, then the time can be shortened. Conversely, if the number of log records are not many, then you can of months to create a new log file.
In addition according to the time to create a new log file, but also can log file size to create a new log file. In the IIS log manager can select the “maximum file size.” And enter an appropriate size. The case, when the log file reaches a specified size, the system will automatically log them to switch. But I do not agree with this approach. Although the redo log files can be controlled within a reasonable size, but its time to break its internal links.By that time, when they encounter problems check up will be very inconvenient. So I set up a time or to split the redo log files.
Another manager also provides another useful option, that is, whether to local time user file naming and rollover. This is a great use of the option. Select this option, the system automatically creates a log file will reflect the time information. This is for system administrators to find the log file, can provide great help. Especially if split by file size to redo log files, then this option must be selected to facilitate the subsequent search.