public void WriteException(string source, string frame, string exception, string description, string name) { if (_helper.ShouldLog) { using (new TimingOutLock(_thisLock)) { var index = _index.GetValue(); var step = new TraceStep { Name = name, Index = index, Frame = frame, Source = source, Metadata = exception, Type = StepType.Exception, StepTimestamp = _now.UtcNow, Message = description }; _steps.Add(step); _index.Increment(); } } }
public void WriteMessage(string source, string frame, string message) { if (_helper.ShouldLog) { using (new TimingOutLock(_thisLock)) { var index = _index.GetValue(); var step = new TraceStep { Index = index, Message = message, Frame = frame, Source = source, StepTimestamp = _now.UtcNow, Metadata = string.Empty, Type = StepType.Message, Name = string.Empty }; _steps.Add(step); _index.Increment(); } } }