mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-15 03:25:01 -05:00
fix log not logging anything
This commit is contained in:
parent
4614d2c21a
commit
df4b4dbd9c
4 changed files with 6 additions and 5 deletions
|
@ -40,7 +40,7 @@ __attribute__((constructor)) void _entry() {
|
|||
if (ghc::filesystem::exists(updatesDir / "Geode.dylib", error) && !error) {
|
||||
ghc::filesystem::rename(
|
||||
updatesDir / "Geode.dylib",
|
||||
workingDir / "Geode.dylib", error
|
||||
libDir / "Geode.dylib", error
|
||||
);
|
||||
if (error) {
|
||||
displayError(std::string("Couldn't update Geode: ") + error.message());
|
||||
|
|
|
@ -57,7 +57,8 @@ void InternalLoader::executeGDThreadQueue() {
|
|||
|
||||
void InternalLoader::logConsoleMessage(std::string const& msg) {
|
||||
if (m_platformConsoleOpen) {
|
||||
std::cout << msg;
|
||||
// TODO: make flushing optional
|
||||
std::cout << msg << '\n' << std::flush;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -371,12 +371,12 @@ Loader::~Loader() {
|
|||
}
|
||||
|
||||
void Loader::pushLog(log::Log&& log) {
|
||||
m_logs.push_back(std::move(log));
|
||||
|
||||
std::string logStr = log.toString(true);
|
||||
|
||||
InternalLoader::get()->logConsoleMessage(logStr);
|
||||
m_logStream << logStr << std::endl;
|
||||
|
||||
m_logs.push_back(std::move(log));
|
||||
}
|
||||
|
||||
void Loader::popLog(log::Log* log) {
|
||||
|
|
|
@ -83,7 +83,7 @@ std::string Log::toString(bool logTime) const {
|
|||
res += fmt::format("{:%H:%M:%S}", this->m_time);
|
||||
}
|
||||
|
||||
res += fmt::format("[{}]:", this->m_sender ? this->m_sender->getName() : "?");
|
||||
res += fmt::format(" [{}]: ", this->m_sender ? this->m_sender->getName() : "?");
|
||||
|
||||
for (ComponentTrait* i : this->m_components) {
|
||||
res += i->_toString();
|
||||
|
|
Loading…
Reference in a new issue