none
regarding <SPULSRetriever> to extract SharePoint ULS Log. RRS feed

  • Question

  • Hi there,

    does anyone have any sample code for <SPULSRetriever> to extract SharePoint ULS Log.

    Thanks


    Hi there, if you found my comment very helpful then please | Propose as answer | . Thanks and Regards.

    Tuesday, December 10, 2019 6:42 AM

All replies

  • Hi

    May I know if you want to merge SharePoint ULS logs from all servers to one log file? If yes, please refer below script.

    $startTime = [datetime]"2019-12-10 10:00:00";
    $endTime = [datetime]"2019-12-10 10:30:00";
    $logFile = "D:\SPULSlog.log";
    
    Merge-SPLogfile -Path $logFile -Overwrite -StartTime $startTime -EndTime $endTime;
    

    Tuesday, December 10, 2019 6:54 AM
  • Hi Tina,

    Thanks for your reply. I just want to know whether or not we could extract ULS Log by using C# API instead of PowerShell. OR we just could use PowerShell for this.

    Thanks.


    Hi there, if you found my comment very helpful then please | Propose as answer | . Thanks and Regards.


    • Edited by Will .H Tuesday, December 10, 2019 6:58 AM
    Tuesday, December 10, 2019 6:58 AM
  • Hi Will,

    As checked, looks like there is SPULSRetriever class could extract ULS log. hope the link can help.

    http://www.sharepointdoug.com/2013/06/get-log-entries-from-sharepoint-2013.html 

    Tuesday, December 10, 2019 7:29 AM