public SPDiagnosticsCategory this[BaristaDiagnosticCategory id] { get { return(Areas[DiagnosticsAreaName].Categories[id.ToString()]); } }
public void LogMessage(ushort id, BaristaDiagnosticCategory category, TraceSeverity traceSeverity, string message, params object[] data) { if (traceSeverity == TraceSeverity.None) { return; } var cat = this[category]; Local.WriteTrace(id, cat, traceSeverity, message, data); }
public void LogException(Exception ex, BaristaDiagnosticCategory category, string messagePrefix) { if (messagePrefix == null) { messagePrefix = String.Empty; } if (messagePrefix != String.Empty) { messagePrefix = messagePrefix.TrimEnd() + " "; } var cat = this[category]; Local.WriteTrace(1, cat, TraceSeverity.Unexpected, messagePrefix + ex.Message, ex.Data); }