Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
891B

  1. #if UNITY_5_3_OR_NEWER || UNITY_5
  2. namespace Utility
  3. {
  4. public class SlowLoggerUnity : ILogger
  5. {
  6. public void Log(string txt, string stack = null, LogType type = LogType.Log)
  7. {
  8. switch (type)
  9. {
  10. case LogType.Log:
  11. UnityEngine.Debug.Log(stack != null ? txt.FastConcat(stack) : txt);
  12. break;
  13. case LogType.Exception:
  14. UnityEngine.Debug.LogError("Log of exceptions not supported");
  15. break;
  16. case LogType.Warning:
  17. UnityEngine.Debug.LogWarning(stack != null ? txt.FastConcat(stack) : txt);
  18. break;
  19. case LogType.Error:
  20. UnityEngine.Debug.LogError(stack != null ? txt.FastConcat(stack) : txt);
  21. break;
  22. }
  23. }
  24. }
  25. }
  26. #endif