diff Implab.Diagnostics.Interactive/InteractiveListener.cs @ 134:04d4c92d0f28 v2

Improved logging
author cin
date Wed, 11 Feb 2015 02:12:15 +0300
parents 671f60cd0250
children cbb0bd8fc0d1
line wrap: on
line diff
--- a/Implab.Diagnostics.Interactive/InteractiveListener.cs	Mon Feb 09 00:28:13 2015 +0300
+++ b/Implab.Diagnostics.Interactive/InteractiveListener.cs	Wed Feb 11 02:12:15 2015 +0300
@@ -9,7 +9,7 @@
 
 namespace Implab.Diagnostics.Interactive
 {
-    public class InteractiveListener: TextListenerBase
+    public class InteractiveListener: ListenerBase
     {
         TraceForm m_form;
         
@@ -29,7 +29,7 @@
         bool m_paused;
         readonly ManualResetEvent m_pauseEvent = new ManualResetEvent(true);
 
-        public InteractiveListener(bool global) : base(global) {
+        public InteractiveListener() {
             m_guiFinished = AsyncPool.RunThread(GuiThread);
             /*m_workerFinished = */AsyncPool.RunThread(QueueThread);
 
@@ -107,12 +107,12 @@
             base.Dispose(disposing);
         }
 
-        protected override void WriteEntry(LogEventArgs args, EventText text, string channel) {
+        public override void Write(LogEventArgs args, object entry) {
             var item = new TraceViewItem {
-                Indent = text.indent,
-                Message = text.content,
+                Indent = args.Operation.Level,
+                Message = entry.ToString(),
                 Thread = args.ThreadId,
-                Channel = channel,
+                Channel = args.ChannelName,
                 Timestamp = Environment.TickCount
             };