public static void WarningFormat(this TraceServiceBase traceService, int id, object message, object[] parameters) { if (traceService != null && traceService.IsWarningEnabled) { WarningFormat(traceService, id, message, parameters, null); } }
public static void InformationFormat(this TraceServiceBase traceService, int id, object message, object[] parameters) { if (traceService != null && traceService.IsInformationEnabled) { InformationFormat(traceService, id, message, parameters, null); } }
public static void InformationFormat(this TraceServiceBase traceService, int id, object message, object[] parameters, Exception exception) { if (message is string) { traceService.Information(id, string.Format(message as string, parameters), exception); } else { traceService.Information(id, message, exception); } }
public static void ErrorFormat(this TraceServiceBase traceService, int id, object message, object[] parameters, Exception exception) { if (message is string && parameters != null && parameters.Length > 0) { traceService.Error(id, string.Format(message as string, parameters), exception); } else { traceService.Error(id, message, exception); } }
public static void ErrorFormat(this TraceServiceBase traceService, int id, object message, object[] parameters) { if (parameters == null) { ErrorFormat(traceService, id, message, new object[] { }, null); } else { ErrorFormat(traceService, id, message, parameters, null); } }
public static void VerboseFormat(this TraceServiceBase traceService, int id, object message, object parameter) { if (parameter == null) { VerboseFormat(traceService, id, message, new object[] { }); } else { VerboseFormat(traceService, id, message, new object[] { parameter }); } }
public static void ErrorFormat(this TraceServiceBase traceService, int id, object message, object parameter) { if (traceService != null && traceService.IsErrorEnabled) { if (parameter == null) { ErrorFormat(traceService, id, message, new object[] { }); } else { ErrorFormat(traceService, id, message, new object[] { parameter }); } } }
public static void VerboseFormat(this TraceServiceBase traceService, int id, object message, object[] parameters, Exception exception) { if (traceService != null && traceService.IsVerboseEnabled) { if (message is string && parameters != null && parameters.Length > 0) { traceService.Verbose(id, string.Format(message as string, parameters), exception); } else { traceService.Verbose(id, message, exception); } } }
public static void VerboseFormat(this TraceServiceBase traceService, int id, object message, object[] parameters) { if (traceService != null && traceService.IsVerboseEnabled) { if (parameters == null) { VerboseFormat(traceService, id, message, new object[] { }, null); } else { VerboseFormat(traceService, id, message, parameters, null); } } }
public static void WarningFormat(this TraceServiceBase traceService, int id, object message, object[] parameters, Exception exception) { if (traceService != null && traceService.IsWarningEnabled) { if (message is string) { traceService.Warning(id, string.Format(message as string, parameters), exception); } else { traceService.Warning(id, message, exception); } } }
public TraceActivityScope(TraceServiceBase traceService, int eventId, string startMessage, string endMessage) { TraceService = traceService; var activityId = Guid.NewGuid(); EventId = eventId; EndMessage = endMessage; OldActivityId = TraceService.CurrentActivityId; TraceService.TraceActivityTransfer(eventId, startMessage, activityId); TraceService.CurrentActivityId = activityId; TraceService.TraceActivityStart(eventId, startMessage); }
public TraceActivityScope(TraceServiceBase traceService, int eventId, string message) : this(traceService, eventId, string.Format("Starting: [{0}]", message), string.Format("Ending: [{0}]", message)) { }
public TraceMethodActivityScope(TraceServiceBase traceService, int eventId) : base(traceService, eventId, new StackFrame(1).GetMethod().Name) { }
public TraceActivityScope(TraceServiceBase traceService, int eventId, string message) : this(traceService, eventId, string.Format("Starting: [{0}]", message), string.Format("Ending: [{0}]", message)) { }
public TraceActivityScope(TraceServiceBase traceService, int eventId, string startMessage, string endMessage) { TraceService = traceService; var activityId = Guid.NewGuid(); EventId = eventId; EndMessage = endMessage; OldActivityId = TraceService.CurrentActivityId; TraceService.TraceActivityTransfer(eventId, startMessage, activityId); TraceService.CurrentActivityId = activityId; TraceService.TraceActivityStart(eventId, startMessage); }
public static void WarningFormat(this TraceServiceBase traceService, int id, object message, object parameter) { WarningFormat(traceService, id, message, new object[] { parameter }); }
public static void WarningFormat(this TraceServiceBase traceService, int id, object message, object[] parameters) { WarningFormat(traceService, id, message, parameters, null); }
public TraceMethodActivityScope(TraceServiceBase traceService, int eventId) : base(traceService, eventId, new StackFrame(1).GetMethod().Name) { }