Zoek
ULS LOGGING IN SHAREPOINT 2010

This has really improved in SharePoint 2010. Now you can write to the ULS logs easily even with SharePoint Foundation. All you have to do is this:

SPDiagnosticsCategory diagCat = new SPDiagnosticsCategory(

"My category",

TraceSeverity.Monitorable,

EventSeverity.Error);

 

SPDiagnosticsService diagSvc = SPDiagnosticsService.Local;

diagSvc.WriteTrace(

0, // custom trace id

diagCat,

TraceSeverity.Monitorable, // logging level of this record

"Writing to the ULS log: {0}", // custom message

new object[] { "SharePoint rocks!" } // parameters

);


This will result in a nice entry in the SharePoint log file:

Works great, but not available in sandboxed solutions...

Home run! Great slguging with that answer!
Home run! Great slguging with that answer!
op 8-5-2011 om 22:25u
Voor items in deze lijst moet de inhoud worden goedgekeurd. De ingediende gegevens worden pas weergegeven in openbare weergaven als deze zijn goedgekeurd door iemand met de vereiste machtigingen.
Titel * 
Opmerking * 
 
Microsoft Partner - Gold competence Portals and Collaboration
Microsoft Partner - Gold competence Systems Management
© COPYRIGHT ADVANTIVE 2010 | LEGAL NOTICE