Beispiel #1
0
        protected override void Write(LogEventInfo logEvent)
        {
            var currentTest = RunContext.GetCurrentTest();

            if (currentTest != null)
            {
                var log = new Log
                {
                    TestId    = currentTest.Id,
                    Level     = logEvent.Level.Name,
                    Message   = RenderLogEvent(Layout, logEvent),
                    Timestamp = new DateTimeOffset(logEvent.TimeStamp).ToUnixTimeMilliseconds()
                };
                _logsBuffer.Add(log);
            }
        }