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.

SimpleLogger.cs 814B

123456789101112131415161718192021222324
  1. namespace Utility
  2. {
  3. public class SimpleLogger : ILogger
  4. {
  5. public void Log(string txt, string stack = null, LogType type = LogType.Log)
  6. {
  7. switch (type)
  8. {
  9. case LogType.Log:
  10. Console.SystemLog(stack != null ? txt.FastConcat(stack) : txt);
  11. break;
  12. case LogType.Exception:
  13. Console.SystemLog("Log of exceptions not supported");
  14. break;
  15. case LogType.Warning:
  16. Console.SystemLog(stack != null ? txt.FastConcat(stack) : txt);
  17. break;
  18. case LogType.Error:
  19. Console.SystemLog(stack != null ? txt.FastConcat(stack) : txt);
  20. break;
  21. }
  22. }
  23. }
  24. }