Sharepoint audit log trimming RRS feed

  • Question

  • Hi friends,

    I have a web application in MOSS 2007 which is audit log enabled.  This web app has many site collections and as such the logs generated are huge.  The actual problem is we do not want to delete the old logs, but store it in a different shared folder.  So, is there a way to automate export of these logs to that folder/any location or site if possible in preferably the same format that is available for export in SharePoint either via an external tool or via coding? (preferably external tool) 

    Friday, September 16, 2011 2:12 PM


All replies

  • Hi,

    The best practive for audit log is don't store the log in the same drive of the sharepoint server.  Refer the technet URL for best practice of the Audit log


    You can use the powershell command to change the log file location

    The following PowerShell cmdlet will get all the diagnostic configuration values

    If you want to change the location of your diagnostic configuration log use the following PowerShell cmdlet
    Set-SPDiagnosticConfig -LogLocation D:SharePointLogs



    • Marked as answer by Qiao WeiModerator Friday, September 23, 2011 11:38 AM
    • Unmarked as answer by Shonilchi Friday, September 23, 2011 1:24 PM
    Saturday, September 17, 2011 5:18 AM
  • Hi Nehuraj,

    Thanks for the reply, but I am in need of this function for MOSS. and also I would want the logs for some period of time after which it automatically should move to the shared location or to the other location specified.

    Friday, September 23, 2011 1:55 PM
  • Hi,

    Sharepoint server 2007 diagnostic log settings Uses 4 procedures to configure the diagnostic logging settings.

    Refer URL for more detail about the SharePoint server 2007 log settings.


    Also, STSADM command also supports for configuring log. refer the below URL for STSADM command for log setting


    Regardng moving the log from one location to another location, have a windows schedler, which will trigger a batch file process. In the batch file write the command to move the log files from the shared location to other location.



    Wednesday, September 28, 2011 3:00 AM