Solved

How to locate IIS log file base on date and time ?

Posted on 2014-04-23
6
369 Views
Last Modified: 2014-04-23
Hello,

I'm using a parser to parse IIS log files on a daily basis. Now, question is how should I know which file is today's file?  

How does IIS  generate its logs?  
As far as I know when its service is stopped or restarted it creates a new log file. am I right? if  so then how can I locate all files (related to one day) ?

Thanks,
ak
0
Comment
Question by:akohan
  • 4
  • 2
6 Comments
 
LVL 2

Expert Comment

by:pablito70
ID: 40018308
Hello,
IIS log files may be stored in:

C:\Windows\System32\LogFiles\W3SVC1

and inside W3SVC1:

W3SVC1\exyymmdd.log

In any case,open Internet Information Services (IIS), than find your website and right click and select Properties.
Go to Web tab and check for Active Log Format.

HTH
0
 

Author Comment

by:akohan
ID: 40018431
Thanks but seems you didn't read my question.
0
 

Author Comment

by:akohan
ID: 40018696
OK my bad! I was reading it on cell phone and didn't notice your comment.
Let me get back to you.

Thank you again.
0
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

Author Comment

by:akohan
ID: 40018798
so if server shuts down or IIS service gets restarted what happens to the log file name?
how should I distinguish which is which?

Thanks.
0
 
LVL 2

Accepted Solution

by:
pablito70 earned 300 total points
ID: 40019283
Tried with stop/start w3svc on a W2003 server (IIS6).
Log file is the same of the day (i.e. ex140424.log) but when start w3svc, in the log you will find:

#Software: Microsoft Internet Information Services 6.0
#Version 1.0
#Date: 2014-04-24 05:17:49
#Fields: date time etc etc etc

and than all logs for W3SVC1 service.

So the file will be the same, but each time you restart the service, it will put a header as above.

Not tried with IIS7 but should be the same.

HTH
0
 

Author Closing Comment

by:akohan
ID: 40019312
Thank you
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question