public void TestLogMessagePersistance()
        {
            LogRow message = new LogRow()
            {
                Category = "aa,aa",
                Message = "hello\nworld",
                Severity = LogSeverity.Error,
                ThreadId = 100,
                ThreadName = "my big fat thread",
                Time = DateTime.Now
            };

            var copy = LogRow.FromString(message.ToString());

            Assert.AreEqual(message.Category, copy.Category);
            Assert.AreEqual(message.Message, copy.Message);
            Assert.AreEqual(message.Severity, copy.Severity);
            Assert.AreEqual(message.ThreadId, copy.ThreadId);
            Assert.AreEqual(message.ThreadName, copy.ThreadName);
            Assert.AreEqual(message.Time.Millisecond, copy.Time.Millisecond);
            Assert.AreEqual(message.Time.Second, copy.Time.Second);
            Assert.AreEqual(message.Time.Day, copy.Time.Day);
        }
Example #2
0
 protected override void AsyncLogMessage(LogRow row)
 {
     UpdateStream();
     writer.WriteLine(row.ToString());
 }
 public override void LogMessage(LogRow row)
 {
     Trace.WriteLine(row.ToString());
 }
Example #4
0
 protected override void AsyncLogMessage(LogRow row)
 {
     UpdateStream();
     writer.WriteLine(row.ToString());
 }
Example #5
0
 public override void LogMessage(LogRow row)
 {
     Trace.WriteLine(row.ToString());
 }