COMPASSi/trunk/code/3rd/CCSReport_2/include/utils/ccslogger.h

111 lines
2.3 KiB
C
Raw Normal View History

2025-06-25 15:06:42 +08:00
#ifndef CCSLOGGER_H
#define CCSLOGGER_H
#include <cstdio>
#ifdef Report_LOG
//#include "QsLog.h"
#endif
#define LEVEL_TRACE 0
#define LEVEL_DEBUG 1
#define LEVEL_INFO 2
#define LEVEL_WARN 3
#define LEVEL_ERROR 4
#define LEVEL_CRITICAL 5
#define LEVEL_OFF 6
/// <summary>
/// һ<><D2BB>logger<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>־<EFBFBD><D6BE>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>Ϊ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><E1B9A9>־<EFBFBD><D6BE>¼<EFBFBD>ӿڡ<D3BF>
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܣ<EFBFBD>
///
/// </summary>
//using _Logger = _Logger;
#ifdef Report_LOG
//using namespace QsLogging;
//extern Logger& _Logger;
#endif
#define QLOG_INFO()
class CCSLogger
{
public:
#ifdef Report_LOG
#endif
};
//class CCSLoggerInterface
//{
//public:
// static CCSLoggerInterface* _Logger;
// static CCSLoggerInterface* getInstance()
// {
// if (nullptr == _Logger) {
//
// _Logger = new CCSLoggerInterface();
// }
//
// return _Logger;
// }
// void setlevel(int ilevel)
// {
// spdlog::set_level((spdlog::level::level_enum)ilevel);
// }
// void setformmat(int iFmt)
// {
// //spdlog::set_formatter();
// }
//
// template<typename... Args>
// void Trace(std::string fmt, Args &&...args)
// {
// _logger->trace(fmt, args...);
// }
// template<typename... Args>
// void Debug(std::string fmt, Args &&...args)
// {
// _logger->debug(fmt, args...);
// }
// template<typename... Args>
// void Info(fmt::format_string<Args...> fmt, Args &&...args)
// {
// _logger->info(fmt, args...);
// }
// template<typename... Args>
// void Warn(std::string fmt, Args &&...args)
// {
// _logger->warn(fmt, args...);
// }
// template<typename... Args>
// void Error(std::string fmt, Args &&...args)
// {
// _logger->error(fmt, args...);
// }
// template<typename... Args>
// void Critical(std::string fmt, Args &&...args)
// {
// _logger->critical(fmt, args...);
// }
//
// template<typename... Args>
// void reciveMsg(int ilevel, std::string fmt, Args &&...args) {}
//
//private:
// CCSLoggerInterface() {
// _logger = spdlog::rotating_logger_mt("rotating_logger", "logs/rotatingLog.txt", 1048576 * 5, 3);
// }
// CCSLoggerInterface(const CCSLoggerInterface&) {}
// CCSLoggerInterface& operator=(const CCSLoggerInterface&) {}
//
//
// //virtual void setlevel(int ilevel) = 0;
// //virtual void setlevel(int ilevel) = 0;
// //virtual void setlevel(int ilevel) = 0;
//
//protected:
// CCSLOG _logger;
// int m_iLevel;
//};
#endif