소스 검색

added frame number to logger output

Alexander Hendrich 11 년 전
부모
커밋
e7a221bcff
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      bbiwarg/Utility/Logger.cs
  2. 1 0
      bbiwarg/VideoHandle.cs

+ 3 - 1
bbiwarg/Utility/Logger.cs

@@ -20,10 +20,12 @@ namespace bbiwarg.Utility
     }
     static class Logger
     {
+        public static int CurrentFrame { get; set; }
+
         public static void log(string message, LogSubject subject)
         {
             if (Constants.LogLevel.HasFlag(subject))
-                Console.WriteLine(message);
+                Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
         }
     }
 }

+ 1 - 0
bbiwarg/VideoHandle.cs

@@ -128,6 +128,7 @@ namespace bbiwarg
 
         private void processFrameUpdate()
         {
+            Logger.CurrentFrame = CurrentFrame;
             bool newStarted = (lastFrame - CurrentFrame >= 20);
             Timer.start("processFrameUpdate");