Tag: logging

SharePoint Getting Log information for a datetime span with Powershell

That should be cool for SharePoint Administrators. If you would like to get all log information from the ULS log of SharePoint you can use this cool snippet with Powershell and insert the needed datetimes. It will save the information in a file.   Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue Get-SPLogEvent -StartTime "05/06/2014 16:00" -EndTime "05/06/2014 16:30"…

SharePoint create a custom Logger for your application

Logging is always a subject which everybody wants but not does. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.SharePoint.Administration; namespace myCustomLogger.Logger { class myLogger : SPDiagnosticsServiceBase { public static string customDiagnosticAreaName = "I Like SharePoint"; private static myLogger _Current; public static myLogger Current { get { if (_Current == null) {…