2020-03-12 16:23:21 +08:00
|
|
|
|
using System;
|
|
|
|
|
using LeanCloud;
|
|
|
|
|
using LeanCloud.Common;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
|
|
namespace Realtime.Test {
|
|
|
|
|
public static class Utils {
|
|
|
|
|
internal static void Print(LCLogLevel level, string info) {
|
|
|
|
|
switch (level) {
|
|
|
|
|
case LCLogLevel.Debug:
|
2020-06-23 15:25:30 +08:00
|
|
|
|
TestContext.Out.WriteLine($"[DEBUG] {DateTime.Now} {info}\n");
|
2020-03-12 16:23:21 +08:00
|
|
|
|
break;
|
|
|
|
|
case LCLogLevel.Warn:
|
2020-06-23 15:25:30 +08:00
|
|
|
|
TestContext.Out.WriteLine($"[WARNING] {DateTime.Now} {info}\n");
|
2020-03-12 16:23:21 +08:00
|
|
|
|
break;
|
|
|
|
|
case LCLogLevel.Error:
|
2020-06-23 15:25:30 +08:00
|
|
|
|
TestContext.Out.WriteLine($"[ERROR] {DateTime.Now} {info}\n");
|
2020-03-12 16:23:21 +08:00
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
TestContext.Out.WriteLine(info);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|