public SharePointTraceSink( SPDiagnosticsServiceBase diagnosticsService, SPDiagnosticsCategory category, ITextFormatter textFormatter) : base(diagnosticsService, category, textFormatter) { }
protected SharePointSink( SPDiagnosticsServiceBase diagnosticsService, SPDiagnosticsCategory category, ITextFormatter textFormatter) { if (diagnosticsService == null) { throw new ArgumentNullException("diagnosticsService"); } if (category == null) { throw new ArgumentNullException("category"); } DiagnosticsService = diagnosticsService; Category = category; TextFormatter = textFormatter; }
public static LoggerConfiguration SharePointEvent( this LoggerSinkConfiguration loggerConfiguration, SPDiagnosticsServiceBase diagnosticsService = null, SPDiagnosticsCategory diagnosticsCategory = null, LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum, string outputTemplate = DefaultTemplate, IFormatProvider formatProvider = null) { if (loggerConfiguration == null) { throw new ArgumentNullException("loggerConfiguration"); } return(loggerConfiguration.Sink( new SharePointEventSink( diagnosticsService ?? SPDiagnosticsService.Local, diagnosticsCategory ?? DefaultCategory, new MessageTemplateTextFormatter(outputTemplate, formatProvider)), restrictedToMinimumLevel)); }