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

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
akohanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
pablito70Connect With a Mentor Commented:
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
 
pablito70Commented:
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
 
akohanAuthor Commented:
Thanks but seems you didn't read my question.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
akohanAuthor Commented:
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
 
akohanAuthor Commented:
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
 
akohanAuthor Commented:
Thank you
0
All Courses

From novice to tech pro — start learning today.