/// <summary> /// 添加一条网络日志 /// </summary> /// <param name="msg">Message.</param> /// <param name="type">Type.</param> /// <param name="info">Info.</param> public static void LogNet(string msg, string type, string info) { LogData.Append(type, msg, "\ninfo: " + info); }
/// <summary> /// 添加一条警告日志 /// </summary> /// <param name="msg">Message.</param> /// <param name="stackTrace">Stack trace.</param> public static void LogWarning(string msg, string stackTrace) { LogData data = LogData.Append(LogData.TYPE_WARNING, msg, stackTrace); Debug.LogWarning(data); }
/// <summary> /// 添加一条错误日志 /// </summary> /// <param name="msg">Message.</param> /// <param name="stackTrace">Stack trace.</param> public static void LogError(string msg, string stackTrace) { LogData data = LogData.Append(LogData.TYPE_ERROR, msg, stackTrace); Debug.LogError(data); }
/// <summary> /// 添加一条普通日志 /// </summary> /// <param name="msg">Message.</param> /// <param name="type">Type.</param> /// <param name="stackTrace">Stack trace.</param> public static void Log(string msg, string type = LogData.TYPE_LOG, string stackTrace = null) { LogData data = LogData.Append(type.Trim(), msg, stackTrace); Debug.Log(data); }