Esempio n. 1
0
 /// <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);
 }
Esempio n. 2
0
        /// <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);
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
        /// <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);
        }