Solved

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

Posted on 2014-04-23
6
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A procedure for exporting installed hotfix details of remote computers using powershell
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…

738 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