Logger.cs 827 B

1234567891011121314151617181920212223242526272829303132333435
  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. TouchEvents = 128,
  19. VideoControls = 256,
  20. HandTracker = 512,
  21. PalmTracker = 1024
  22. }
  23. static class Logger
  24. {
  25. public static int CurrentFrame { get; set; }
  26. public static void log(string message, LogSubject subject)
  27. {
  28. if (Parameters.LoggerEnabledSubjects.HasFlag(subject))
  29. Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
  30. }
  31. }
  32. }