package com.example.bpa.service;

import com.example.bpa.Model.IThread;
import com.example.bpa.helper.MessageLog;
import com.example.bpa.helper.ThreadManager;

/**
 * 日志服务
 * 周期性上报日志
 */
public class LogServer {

    //region 私有单例
    private static volatile LogServer _instance;

    public static LogServer Get() {
        if (_instance == null)
            _instance = new LogServer();
        return _instance;
    }

    private LogServer() {
    }
    //endregion

    //region

    /**
     * 初始化
     */
    public void Init()
    {
//        ThreadManager.Get().StartLong("日志服务", true, new IThread() {
//            @Override
//            public void Run() throws InterruptedException {
//                MessageLog.ShowInfo("我是日志服务！");
//                Thread.sleep(2000);
//            }
//            @Override
//            public void RunComplete() throws InterruptedException {
//            }
//        });
    }
    //endregion
}
