Writing errors to ULS logs and event logs Sharepoint 2010 |
In SharePoint Foundation, ULS exposes configurable settings in two ways, through the:
using Microsoft.SharePoint.
using Microsoft.SharePoint. WriteEvent(0, new SPDiagnosticsCategory(“Add Category”, TraceSeverity.Monitorable, EventSeverity.Error), Using Powershell - Microsoft SharePoint Foundation 2010 also provides the ability to use Windows PowerShell cmdlets for manipulating Unified Logging Service (ULS) log settings. There are number of cmdlets available. I have listed some of the them below : Get-SPDiagnosticConfig – Retrieves Diagnostic Configuration values. Set-SPDiagnosticConfig – Allows setting Diagnostic Configuration values. Get-SPLogLevel – Returns IDiagnosticsLevel2 objects or displays a list of diagnostics levels. Set-SPLogLevel – Allows the user to set the trace and event level for a set of categories. Clear-SPLogLevel – Resets the trace and event levels back to their default values. New-SPLogFile – Ends the current log file and starts a new one. Get-SPLogEvent – Reads/queries ULS trace logs. Merge-SPLogFile – Combines trace log files from all farm servers into a single file |
Monday, November 28, 2011
Writing errors to ULS logs and event logs Sharepoint 2010
Category:
SharePoint 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment