Configure SharePoint Logs From Code

11 Jul

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 /> … Read More »