Configure SharePoint Logs From Code
11. July 2008 08:51

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;

usageSettings.LoggingEnabled = true;
usageSettings.NumberLogFiles = 5;
usageSettings.LogFilesDirectory = "c:\\logs";
usageSettings.UsageProcessingEnabled = true;

usageSettings.SetProcessingInterval(1, 0, 1, 0);

usageSettings.Update(false);
Tags: Comments (0) | Permalink

Comments

Comments are closed