mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-15 00:09:26 +08:00
23 lines
473 B
C++
23 lines
473 B
C++
#include <spdlog/spdlog.h>
|
|
#include <thread>
|
|
|
|
#include "logger.hpp"
|
|
#include "server.hpp"
|
|
|
|
void init_logger() {
|
|
auto my_sink = std::make_shared<net_sink_mt>();
|
|
auto custom_logger = std::make_shared<spdlog::logger>("Cracker", my_sink);
|
|
spdlog::set_default_logger(custom_logger);
|
|
}
|
|
|
|
void start() {
|
|
init_logger();
|
|
SPDLOG_INFO("Cracker loaded !");
|
|
CrackerServer::Start();
|
|
}
|
|
|
|
__attribute__((constructor))
|
|
void init() {
|
|
std::thread(start).detach();
|
|
}
|