viernes, 17 de febrero de 2012

Logging in SharePoint

SPDiagnosticsService.Local.WriteTrace(0, new

SPDiagnosticsCategory(“My category”,

TraceSeverity.Unexpected, EventSeverity.Error),

TraceSeverity.Unexpected, ex.Message, ex.StackTrace);


Your solution might have the minium log level set to higher than “Information” and your entry will not be written if your log level is set too low

If your application is running on one of the front-end Web servers in the farm, the property LOCAL returns an instance of the SPDiagnosticsService class. If an instance of the service does not exist, when you access this property, an instance is created on the local server and the change propagates to all servers in the server farm.

If you are not connected to a front-end Web server in the server farm, the property returns Nothing.

No hay comentarios:

Publicar un comentario