Logging in IIS 8

1 comment
Logging in IIS 8

Logging is used for keeping the information about Site or Application usage. This information will be used by developers while fixing any issues based on the type and detail of information provided in the log file.

Enabling Logging

For enabling the logging feature in IIS, we need to turn on some features.
For more on how to turn on these features see my previous blog post here

We will need to install the marked features in the below image for enabling the logging feature.




Configuring Logging feature

#1. Open the IIS

#2. Click on the server, site, or application from the connections pane for which you want to configure the logging feature.

#3. Double click on Logging or select Logging and click Open Feature under the Actions pane, to open the Logging feature.

#4. Now you will be able to see the Logging window as below

#5. From that pane, Select the values as per your requirement. Description about those options are as follows
  • One log file per
    • If you want single log file for one site you can select Site or if you want single log file to entire server then you can select Sever. The selection of Server in this drop down is also know as Centralized Logging.
  • Log File
    • Format
      • IIS: This is a non customizable format made by ASCII for which details can be logged which can't be logged
      • W3C: Now-a-days this is the log format which is getting used widely on web servers 
      • NCSA: This is the default log format for Apache and other web servers. This is similar to the IIS format because it is also fixed format made by ASCII.
    • Select Fields
      • You can also customize the fields for logging by clicking on this feature.
    • Directory
      • Specify the path for where to save the log files.
    • Encoding
      • Specify the encoding of log file format.
  • Log Event Destination
    • To use this feature make sure that you have selected W3C as log file format.
    • Choose your option either to log file or event tracing or both of those.
  • Log File Roll Over
    • This option is for choosing when to create new log file.
    • For this you can choose any one of those options either on schedule basis or Max size basis.
Once you are done with the changes, click on Apply in Actions pane to save the changes.

1 comment :