Solved

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

Posted on 2014-04-23
6
363 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
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…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

772 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