« Previous Next »

Thread: -logfile.truncatesize:1048576 in Applicationhost.config

Last post 12-10-2007 11:32 AM by tatam. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 11-15-2007, 11:41 AM

    • tatam
    • Not Ranked
    • Joined on 11-15-2007, 10:48 AM
    • Posts 3

    -logfile.truncatesize:1048576 in Applicationhost.config

    I think the line above means, if an IIS logfile become larger than the size given it will truncated. But, I don't really know how does it work?

    How can I test it? And what is the measure of the size given? Is it bytes or KBs?

    Any help or ideas would be gratefully appreciated.

     

  • 11-21-2007, 9:56 AM In reply to

    • mats550
    • Not Ranked
    • Joined on 11-21-2007, 1:41 PM
    • Posts 8

    Re: -logfile.truncatesize:1048576 in Applicationhost.config

    it should be bytes, but seems there is a minimum size. you can't set it very small

     

  • 12-06-2007, 5:05 AM In reply to

    • tatam
    • Not Ranked
    • Joined on 11-15-2007, 10:48 AM
    • Posts 3

    Re: -logfile.truncatesize:1048576 in Applicationhost.config

    Thank you for your Reply.

    I have the following settings in my "Applicationhost.config":

             <log>
                <centralBinaryLogFile enabled="true" directory="%SystemDrive%\inetpub\logs\LogFiles" period="MaxSize" truncateSize="2097152" />
                <centralW3CLogFile enabled="true" directory="%SystemDrive%\inetpub\logs\LogFiles" period="MaxSize" truncateSize="2097152" />
            </log>

            <sites>
                <site name="Default Web Site" id="1">
                    <application path="/">
                        <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
                    </application>
                    <bindings>
                        <binding protocol="http" bindingInformation="*:80:" />
                    </bindings>
                    <traceFailedRequestsLogging enabled="true" />
                </site>
                <siteDefaults>
                    <logFile customLogPluginClsid="{FF160663-DE82-11CF-BC0A-00AA006111E0}" directory="%SystemDrive%\inetpub\logs\LogFiles" />
                    <traceFailedRequestsLogging directory="%SystemDrive%\inetpub\logs\FailedReqLogFiles" />
                </siteDefaults>
                <applicationDefaults applicationPool="DefaultAppPool" />
                <virtualDirectoryDefaults allowSubDirConfig="true" />
            </sites>

    According to this settings, I expect, that the logfiles will be cleared if they reach the Size of 2 MB. But, it doesn't work.

    Can anyone help? Thank you.

  • 12-06-2007, 1:52 PM In reply to

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

    Re: -logfile.truncatesize:1048576 in Applicationhost.config

    log-file is not cleared when truncatesize is reached - it specifies the maximum size of the log-file - beyond that, that log-file is closed and another one is opened for further logging - this allows you to manually clean up the now closed log-file - IIS never cleans up the log file.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 12-10-2007, 11:32 AM In reply to

    • tatam
    • Not Ranked
    • Joined on 11-15-2007, 10:48 AM
    • Posts 3

    Re: -logfile.truncatesize:1048576 in Applicationhost.config

    Thank you very much for your answer.

Page 1 of 1 (5 items)
Microsoft Communities