wip
This commit is contained in:
parent
15e2abbada
commit
03b8658666
18 changed files with 257 additions and 57 deletions
25
engine/src/log.cc
Normal file
25
engine/src/log.cc
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue