locked
IIS Advanced Logging 1.0 Feedback RRS feed

  • Question

  • User-1756696809 posted

    Please use this thread to provide feedback on IIS Advanced Logging 1.0 release. We look forward to your input!

    Monday, October 12, 2009 6:19 PM

All replies

  • User-1035381163 posted

    Would be nice to see Powershell commands or ways using Powershell to change or set any value or feature that you can with the Advanced Logging GUI.

     If I have 1000 servers to set this up on, I need to do it with a non-GUI process and I do NOT want to pay for a WISE license to do it either.

    Thursday, July 21, 2011 3:10 PM
  • User-620729683 posted

    Yes there are multiple post/requirement for managing via powershell.

    Thursday, July 21, 2011 4:04 PM
  • User-47214744 posted

    You should be able to use the IIS PowerShell module for that, or even simpler use AppCmd, for example:

    appcmd.exe set config "example.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='MyCustomLog',enabled='False',logRollOption='Schedule',schedule='Hourly',publishLogEvent='False']" /commit:apphost

    appcmd.exe set config "example.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='MyCustomLog'].selectedFields.[id='Win32Status',logHeaderName='sc-win32-status']" /commit:apphost

    appcmd.exe set config "example.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='MyCustomLog'].selectedFields.[id='UserName',logHeaderName='cs-username']" /commit:apphost

    appcmd.exe set config "example.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='MyCustomLog'].selectedFields.[id='URI-Stem',logHeaderName='cs-uri-stem']" /commit:apphost

    appcmd.exe set config "example.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='MyCustomLog'].selectedFields.[id='URI-Querystring',logHeaderName='cs-uri-stem']" /commit:apphost

    appcmd.exe set config "example.com" -section:system.webServer/advancedLogging/server /+"logDefinitions.[baseFileName='MyCustomLog'].selectedFields.[id='Substatus',logHeaderName='sc-substatus']" /commit:apphost

    Thursday, July 21, 2011 9:54 PM
  • User-1035381163 posted
    I heard appcmd was/is being deprecated, so Powershell or bust.
    Friday, July 22, 2011 7:26 AM
  • User231275879 posted

    I've been trying to get a normal instance of Daily logging to work. Although my understanding of what is normal may be completely bizarro. My assumption of daily logging is follows:

    Desired Behavior
    exMMDDYYYY.log - I should be able to fully customize the file name and tell it how often it should it log and what it should log. For instance, a Daily log should only created 1 log per day, like a normal person would expect; an Hourly log, 1 log per hour. You get the idea.

    Actual Behavior
    ex_D20110729-151513910.log - The "ex" is my custom format preface. I would like to remove the underscore and the D. What exactly is the extra string of numbers after the date stamp and why when set to Daily logging does it continually fill up the directory with log files when it could just as easily append to an existing log file? At least give me the option.

    Within a span of a few hours I have this following list of 1k logs:

    ex_D20110802-131916621
    ex_D20110802-131608184
    ex_D20110802-131856731
    ex_D20110802-143306590
    ex_D20110802-143305637
    ex_D20110802-145745043
    ex_D20110802-152715043
    ex_D20110802-152716668
    ex_D20110802-152229856

    Thursday, August 4, 2011 11:28 AM