using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MeterVision.FreeAi
{
    public class FaLog
    {
        //本次运行的主键
        public string RunKey { get; }

        private StringBuilder sbRunLog = new StringBuilder();
        private StringBuilder sbAiLog = new StringBuilder();
        private StringBuilder sbMcuLog = new StringBuilder();

        public FaLog()
        {
            this.RunKey = Guid.NewGuid().ToString();

        }

        //添加MCU Log(加换行符)
        public void Appendln_mcuLog(String message)
        {
            sbMcuLog.Append(message + "\n");
            sbRunLog.Append(message + "\n");
        }

        //添加MCU Log(不加换行)
        public void Append_mcLog(String message)
        {
            sbMcuLog.Append(message);
            sbRunLog.Append(message);
        }

        //添加AILog
        public void Append_aiLog(String message)
        {
            sbAiLog.Append(message);
            sbRunLog.Append(message);
        }
        /////////////////////////////////////////
    }
}
