This project is read-only.
Project Description
This solution is designed for SharePoint 2010 (not tested on SharePoint 2013 yet).
It helps administrators extract informations from the ULS logs.
It consists in a list and a timer job.
The list contains the information regarding what you want to extract from the ULS logs.
The Timer job reads the list and extract the corresponding logs. Then it attaches it to the list item in the list.

Install it and activate the feature with and administrator account. Otherwise you will get a security exception. This is due to the that the feature is web scoped and it has to register a timer job.
Here's the script to do so :
Add-PSSnapin Microsoft.SharePoint.PowerShell
Add-SPSolution ULSLogExtractor.wsp
Install-SPSolution ULSLogExtractor.wsp -GACDeployment
Enable-SPFeature bb8dabb8-92d4-4cb9-89f3-19ab1787499f -URL http://yoursiteurl

The feature will create a list and register a timer job.

The timer job uses the Merge-SPLogFile Powershell command.
This feature shouldn't be used by non-administrators users since if you create a lot of extract requests, it will put some pressure on the server executing the Merge-SPLogFile command.

Once installed and activated, the feature will create a list called "ULS log extractor list" :

Create elements in this list :

If you don't fill the dates, the log extractor will look for logs in the past hour.

Wait for the job to kick in (every 5 minutes by default) :

Once completed, the job will add the extracted log as an attachement to the item :

Last edited Jan 27, 2014 at 1:00 PM by kirikou974, version 6