public static void WriteVerbose(object message, IDictionary <string, object> properties) { var p = properties == null ? new Dictionary <string, object>() : new Dictionary <string, object>(properties); var props = ". {" + string.Join(", ", p.Select(x => x.Key + ": " + x.Value)) + "}"; SnTrace.Write($"{message}. {props}"); }
public static void WriteVerbose <T>(object message, Func <T, IDictionary <string, object> > getPropertiesCallback, T callbackArg) { var d = getPropertiesCallback?.Invoke(callbackArg); var p = d == null ? new Dictionary <string, object>() : new Dictionary <string, object>(d); var props = ". {" + string.Join(", ", p.Select(x => x.Key + ": " + x.Value)) + "}"; SnTrace.Write($"{message}. {props}"); }
public static void WriteVerbose(object message, IEnumerable <string> categories, IDictionary <string, object> properties) { var p = new Dictionary <string, object>(); if (categories != null) { p.Add("categories", string.Join(",", categories)); } var props = ". {" + string.Join(", ", p.Select(x => x.Key + ": " + x.Value)) + "}"; SnTrace.Write($"{message}. {props}"); }
public static void WriteVerbose(object message, IEnumerable <string> categories, int priority, int eventId, string title, IDictionary <string, object> properties) { var p = properties == null ? new Dictionary <string, object>() : new Dictionary <string, object>(properties); if (categories != null) { p.Add("categories", string.Join(",", categories)); } if (title != null) { p.Add("title", title); } p.Add("priority", priority); p.Add("eventId", eventId); var props = ". {" + string.Join(", ", p.Select(x => x.Key + ": " + x.Value)) + "}"; SnTrace.Write($"{message}. {props}"); }
public static void WriteVerbose(object message) { SnTrace.Write(message.ToString()); }