2021-03-20 14:51:45 +01:00
|
|
|
#include "Gedeng/Logger.h"
|
2021-03-20 16:55:43 +01:00
|
|
|
#include "spdlog/common.h"
|
|
|
|
#include "spdlog/sinks/stdout_color_sinks.h"
|
|
|
|
#include "spdlog/spdlog.h"
|
2021-03-16 15:09:30 +01:00
|
|
|
|
2021-03-20 14:51:45 +01:00
|
|
|
namespace Gedeng {
|
|
|
|
|
2021-03-20 16:55:43 +01:00
|
|
|
std::shared_ptr<spdlog::logger> Logger::core_logger;
|
|
|
|
std::shared_ptr<spdlog::logger> Logger::client_logger;
|
|
|
|
|
|
|
|
void Logger::init() {
|
|
|
|
spdlog::set_pattern("%^[%T] %n: %v%$");
|
|
|
|
|
|
|
|
core_logger = spdlog::stdout_color_mt("GEDENG");
|
|
|
|
core_logger->set_level(spdlog::level::trace);
|
|
|
|
|
|
|
|
client_logger = spdlog::stdout_color_mt("APP");
|
|
|
|
client_logger->set_level(spdlog::level::trace);
|
2021-03-16 15:09:30 +01:00
|
|
|
}
|
2021-03-20 14:51:45 +01:00
|
|
|
|
|
|
|
} // namespace Gedeng
|