using XGame.Framework.Json;
using System;

namespace XGame.Framework.Logger
{
    internal struct LogCodeEntity
    {
        public string client_time;
        public string log_level;
        public string log_info;

        public string ToConsoleString()
        {
            return $"[{log_level}]{log_info}";
        }
        public string ToWriteString()
        {
            client_time = DateTime.UtcNow.AddHours(8).ToString("yyyy-MM-ddTHH:mm:ss.fffzzzz");
            return XJson.ToJson(this);
        }
    }
}
