示例#1
0
        /// <summary>
        /// 添加一条日志
        /// </summary>
        /// <param name="type">Type.</param>
        /// <param name="msg">Message.</param>
        /// <param name="stackTrace">Stack trace.</param>
        public static LogData Append(string type, string msg, string stackTrace = null)
        {
            LogData data = new LogData();

            data.type       = type;
            data.msg        = msg.Replace("\n", " ");
            data.stackTrace = stackTrace;
            data.time       = DateTime.Now.ToString("HH:mm:ss.fff");

            LogFileWriter.Append(data);

            return(data);
        }
示例#2
0
 void OnDestroy()
 {
     LogFileWriter.Destroy();
 }