private static void WritePrivate(object message, IEnumerable <string> categories = null, int priority = -1, int eventId = 1, TraceEventType severity = TraceEventType.Information, string title = null, IDictionary <string, object> properties = null) { switch (severity) { case TraceEventType.Critical: case TraceEventType.Error: SnLog.WriteError(message, eventId, categories, priority, title, properties); break; case TraceEventType.Warning: SnLog.WriteWarning(message, eventId, categories, priority, title, properties); break; case TraceEventType.Verbose: // do nothing: verbose log should be written using SnTrace break; case TraceEventType.Information: SnLog.WriteInformation(message, eventId, categories, priority, title, properties); break; default: SnLog.WriteInformation(severity + ": " + message, eventId, categories, priority, title, properties); break; } }
public static void WriteCritical( int eventId, object message, IEnumerable <string> categories = null, int priority = -1, string title = null, IDictionary <string, object> properties = null) { SnLog.WriteError(message, eventId, categories, priority, title, properties); }
public static void WriteCritical <T>(int eventId, object message, IEnumerable <string> categories, Func <T, IDictionary <string, object> > getPropertiesCallback, T callbackArg) { SnLog.WriteError(message, eventId, categories, properties: getPropertiesCallback?.Invoke(callbackArg)); }
public static void WriteError <T>(object message, Func <T, IDictionary <string, object> > getPropertiesCallback, T callbackArg) { SnLog.WriteError(message, properties: getPropertiesCallback?.Invoke(callbackArg)); }