Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently, my IIS log looks like this (using W3C logging):

2012-02-15 00:31:50 W3SVC1 ...

Is there a way to include milliseconds, such as:

2012-02-15 00:31:50.123 W3SVC1 ...
share|improve this question
up vote 4 down vote accepted

If you have no problem with an alternative logging provider, simply download, install, enable and configure the Advanced Logging extension to IIS 7 and 7.5

The standard definition of the UTC time stamp, is in the format: HH:MM:SS.sss just as you want.

For more information on the Advanced Logging feature and how to configure it, read this blog post

With the built-in W3C extended log format: No!

Though I can't possibly know that. The only thing I know, is that the official W3C standard draft specifies that the time field is NOT of the same type as the time-taken field (which does include milliseconds).

They are of the types <time> and <fixed>, respectively, and I wouldn't be surprised if Microsoft hardcoded the formats, since the draft allows for some freedom to choose how accurate an implementation should be (just HH:MM would be considered a valid <time> format)

share|improve this answer
I'll give you a +1 but let's not focus on W3C, I'd gladly change to a different IIS logging format if it offered better logging. – Jon Feb 21 '12 at 0:25
I see, thought you were asking specifically about W3C logging in IIS, updated the answer – Mathias R. Jessen Feb 21 '12 at 1:04
Unfortunately the 2 year old bug mentioned in means I can't use Advanced Logging. – Jon Mar 19 '12 at 4:48
That's a bummer... Since you haven't revealed the motif behind your urge to log the timestamp in milliseconds and include custom fields, but you might want to look into ELMAH – Mathias R. Jessen Mar 19 '12 at 4:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.