mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-08-28 04:53:20 +00:00
added new log prefix, ready for new system
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
std::string getDate() {
|
||||
typedef std::chrono::duration<int, std::ratio_multiply<std::chrono::hours::period, std::ratio<24>>::type> days;
|
||||
std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
|
||||
@@ -70,6 +72,13 @@ void error(const std::string& toPrint) {
|
||||
std::cout << Print;
|
||||
addToLog(Print);
|
||||
}
|
||||
void fatal(const std::string& toPrint) {
|
||||
std::string Print = getDate() + Sec("[FATAL] ") + toPrint + "\n";
|
||||
std::cout << Print;
|
||||
addToLog(Print);
|
||||
std::this_thread::sleep_for(std::chrono::seconds(5));
|
||||
_Exit(-1);
|
||||
}
|
||||
void except(const std::string& toPrint) {
|
||||
std::string Print = getDate() + Sec("[EXCEP] ") + toPrint + "\n";
|
||||
std::cout << Print;
|
||||
|
||||
Reference in New Issue
Block a user