Logger.cs 749 B

1234567891011121314151617181920212223242526272829303132
  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. TouchEvents = 256
  20. }
  21. static class Logger
  22. {
  23. public static int CurrentFrame { get; set; }
  24. public static void log(string message, LogSubject subject)
  25. {
  26. if (Constants.LogLevel.HasFlag(subject))
  27. Console.WriteLine("Frame: " + CurrentFrame + "\t" + message);
  28. }
  29. }
  30. }