Logger.cs 722 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace bbiwarg.Utility
  7. {
  8. public enum LogSubject
  9. {
  10. None = 0,
  11. FingerDetector = 1,
  12. FingerTracker = 2,
  13. HandDetector = 4,
  14. PalmDetector = 8,
  15. TouchDetector = 16,
  16. TouchTracker = 32,
  17. TUIOServer = 64,
  18. Timer = 128
  19. }
  20. static class Logger
  21. {
  22. public static int CurrentFrame { get; set; }
  23. public static void log(string message, LogSubject subject)
  24. {
  25. if (Constants.LogLevel.HasFlag(subject))
  26. Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
  27. }
  28. }
  29. }