If you want to configure SharePoint via code you can use the methods available in the Microsoft.SharePoint.Administration namespace. For example, to configure the Usage Logs:
|
SPUsageSettings usageSettings = SPWebService.AdministrationService.UsageSettings;<br /><br /> usageSettings.LoggingEnabled = <span class="kwrd">true</span>;<br /> usageSettings.NumberLogFiles = 5;<br /> usageSettings.LogFilesDirectory = "c:\logs";<br /> usageSettings.UsageProcessingEnabled = <span class="kwrd">true</span>;<br /><br /> usageSettings.SetProcessingInterval(1, 0, 1, 0);<br /><br /> usageSettings.Update(<span class="kwrd">false</span>); |