If you left the settings in SharePoint 2013 as default when installing and configuring, then you will probably have a log path that looks like this for both the ULS log and the Usage and Health log.
C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS
If you want to change this to a new path, maybe on a different disk like D: (recommended) or on a simpler path easier to remember, use the following commands:
|You will need to run the commands in a PowerShell running as administrator and you will also need to load the SharePoint snapin first, add-pssnapin.
For the Diagnostics log(ULS)
set-SPDiagnosticConfig -LogLocation “D:\Program Files\Common files\Microsoft shared\Web server extensions\15\LOGS”
set-SPDiagnosticConfig -LogLocation “D:\SharePoint Logs\ULS”
For the Usage and Health log
set-SPUsageService -UsageLogLocation “C:\Program Files\Common files\Microsoft shared\Web server extensions\15\LOGS”
set-SPUsageService -UsageLogLocation “D:\SharePoint Logs\Health”
set-SPDiagnosticConfig -LogLocation “C:\Program Files\Common files\Microsoft shared\Web server extensions\15\LOGS”
In my environment, the Diagnostics trace log path looks like this:
And for the Usage and Health log, it looks like this:
(If the two paths Point to a different location then you may see this in your event log)
6398 – The Execute method of job definition…SPUsageImportJobDefinition
ULS Log Viewer download
Ankie at my customers, who pointed out the Usage and Health log issue 6398 in the first place.
6 thoughts on “Configure ULS log and Usage and Health log location”
I have a stupid question…I cannot find the location within the sharepoint administration page where the size and locations are set, as you show in your screenshots above. Can you please direct me to the settings? Thank you
If I had read your sources, I wouldn’t have had to ask the stupid question. My apologies, you already answered me. Thank you for this information!
You are welcome.
Thomas – I have an issue where my web server has an E: drive where the users want the log files, and the app server has an F: drive (no E:). Is there a way to configure log file location independently for each server? I have it set up to use F:\SPLogs and every day I get errors on the web server that say “unable to access directory F:\SPLogs”, which makes sense b/c there is no F: drive on this server (only on the app server).
It’s a minor drive letter issue, but it results in no log files being housed on the WFE server for my farm. Any help would be much appreciated!
I do not Think that there is a way to have different paths on different farmservers.
I would recommend putting the log on a disk where it can be on all servers, like C.
Not ideal to a F or E but you would get all the logs.