25 lines
603 B
C++
25 lines
603 B
C++
#include "application.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include "misc/singleton/singleton_manager.h"
|
|
#include "spdlog/async.h"
|
|
#include "spdlog/sinks/basic_file_sink.h"
|
|
|
|
void application::init(const char* runtime_dir) {
|
|
try {
|
|
async_spdlog_ = spdlog::basic_logger_mt<spdlog::async_factory>("async_file_logger", "logs/log.txt");
|
|
} catch (const spdlog::spdlog_ex& ex) {
|
|
std::cout << "Log init failed: " << ex.what() << std::endl;
|
|
}
|
|
|
|
singleton_manager::get()->init();
|
|
}
|
|
|
|
void application::shutdown() {
|
|
singleton_manager::get()->release();
|
|
}
|
|
|
|
void application::request_exit() {
|
|
}
|