« Previous Next »

Not Answered Thread: dontLog

Last post 11-03-2009 1:59 PM by bpw. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 11-02-2009, 9:01 AM

    • bpw
    • Not Ranked
    • Joined on 09-25-2004, 5:57 AM
    • Warrington, England
    • Posts 9

    dontLog

    I'm trying to understand the dontLog feature. I've switched off logging in certain directories using IIS manager, but they're still being logged. The web.config in the dontLog directories contains:

    <system.webServer>

    <httpLogging dontLog="true" />

    </system.webServer>

    I also read that I must modify the 'applicationHost.config' file at 'C:\Windows\System32\inetsrv\config' by setting 'overrideModeDefault' to 'Allow'. The values in this file that relate to logging are:

    <section name="httpLogging" overrideModeDefault="Allow" />

    <add name="HttpLoggingModule" image="%windir%\System32\inetsrv\loghttp.dll" />

    <httpLogging dontLog="false" />

    <add name="HttpLoggingModule" lockItem="true" /> ' do I need to set this to false?

    I'm using AWStats to view the logs. 

    Can anyone spot anything wrong with this approach?

    Thanks in advance.

    Paul

    Paul Weston
  • 11-02-2009, 9:56 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 12:18 AM
    • Shanghai, PRC
    • Posts 1,433

    Re: dontLog

    Check out our references here,

    http://www.iis.net/ConfigReference/system.webServer/httpLogging

    Regards,

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-03-2009, 4:17 AM In reply to

    • bpw
    • Not Ranked
    • Joined on 09-25-2004, 5:57 AM
    • Warrington, England
    • Posts 9

    Re: dontLog

    Thanks for your reply.

    I have already read that reference and followed the instructions in it to get where I am now, but logging is not behaving as I would expect.

    The reference doesn't answer my questions about the 'applicationHost.config' file, and it doesn't say whether setting dontLog='true' on a directory will also disable logging on all sub-directories (I'm assuming it should, but it isn't at the moment).

    I also found these two line in the code examples confusing. The first line says log everything, and the line immediiately following says log nothing?

    httpLoggingSection("selectiveLogging") = "LogAll"

    httpLoggingSection("dontLog") = True

    Do you know of any other resources?

    Paul Weston
  • 11-03-2009, 1:09 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: dontLog

    This should work - I assume you are using W3C logging?  Are you on ws08 or ws08r2?

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 11-03-2009, 1:59 PM In reply to

    • bpw
    • Not Ranked
    • Joined on 09-25-2004, 5:57 AM
    • Warrington, England
    • Posts 9

    Re: dontLog

    I'm using W3C logging on ws08 64-bit.

    Could you explain the above two lines of code to me? If I just include:

    dontLog="true"

    in the web.config file, will this prevent ALL logging in that directory, or only successful logging. Do I have to also add:

    selectiveLogging="LogSuccessful"

    to prevent ANY logging?

    If I read the description of the dontLog attribute, the description says

    "Specifies whether HTTP logging is enabled for successful requests"

    Note 'successful' requests, which implies that unsuccessful requests would still be logged?

    Thanks.

    Paul Weston
Page 1 of 1 (5 items)
Microsoft Communities