/********************************
 *
 * 作者:吴隆健
 * 创建时间: 2019-06-09 10:33:10
 * 
 ********************************/

using System;
using MrWu.Time;
using Newtonsoft.Json;

namespace MrWu.Debug {
    /// <summary>
    /// 日志消息
    /// </summary>
    public struct LogMessage {
        /// <summary>
        /// 消息id
        /// </summary>
        [JsonIgnore]
        public ulong logid;

        /// <summary>
        /// 日志等级
        /// </summary>
        public DebugLevel logLevel;

        /// <summary>
        /// log字符串
        /// </summary>
        [JsonIgnore]
        public string logstr;

        ///// <summary>
        ///// 
        ///// </summary>
        //public string rawContent;

        /// <summary>
        /// 
        /// </summary>
        public DateTime DateTime;

        ///// <summary>
        ///// 创建一个日志消息
        ///// </summary>
        //public LogMessage() {

        //}

        /// <summary>
        /// 创建一个日志消息
        /// </summary>
        /// <param name="logid">日志id</param>
        /// <param name="logLevel">日志等级</param>
        /// <param name="logstr">消息内容</param>
        public LogMessage(ulong logid, DebugLevel logLevel, string logstr) {
            this.logid = logid;
            this.logLevel = logLevel;
            this.logstr = logstr;

            this.DateTime = DateTime.Now;
            //this.rawContent = logstr;
        }
    }
}
