Solved

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

Posted on 2014-04-23
6
359 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
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 the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now