This commit is contained in:
Nishi 2026-06-05 21:43:30 +09:00
commit 03b8658666
18 changed files with 257 additions and 57 deletions

25
engine/src/log.cc Normal file
View file

@ -0,0 +1,25 @@
#include <fishbone/foundation.h>
void fishbone::Logger::init(std::string path) {
this->ofs = std::ofstream(path, std::ios_base::app);
}
fishbone::Logger::Logger() {
this->init("log.txt");
}
fishbone::Logger::Logger(std::string path) {
this->init(path);
}
fishbone::Logger::~Logger() {
this->ofs.close();
}
void fishbone::Logger::log(std::string arg) {
this->log(fishbone::Logger::Info, arg);
}
void fishbone::Logger::log(int level, std::string arg) {
this->ofs << "" + arg << std::endl;
}