Esempio n. 1
0
        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();
                }
            }
        }
Esempio n. 2
0
        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();
                }
            }
        }