Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How To Use The SPULSRetriever.GetULSEntries Method

$
0
0

This is the method in question: https://msdn.microsoft.com/EN-US/library/office/microsoft.sharepoint.diagnostics.spulsretriever.getulsentries.aspx

I recently found this method and was interested in using it for a solution. However, the count is always 0 when executed. I create an instance of the SPULSRetriever class with the start time as 180 minutes ago, the forward check time of 300 minutes, and 1000 max entries.

I then call GetULSEntries with a correlation ID that I found in the logs within the timeframe, but it never finds anything.

I am simply running the code from visual studio on the same server as the SharePoint instance.

Any suggestions?


SPULSRetriever ulsRetriever = new SPULSRetriever(300, 1000, DateTime.Now.AddMinutes(-180));

IList<LogFileEntry> ulsLogEntries = ulsRetriever.GetULSEntries(new Guid("8c65f19c-0237-605e-e12e-53328ffb7868"));


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>