Skip to content

Commit

Permalink
fix: fix Logger::setLogLevel & ColorLog
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jan 29, 2025
1 parent 81a33f0 commit d6b589c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/legacy/api/LoggerAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Local<Value> LoggerClass::setLogLevel(const Arguments& args) {

try {
auto conf = getEngineOwnData();
conf->plugin->getLogger().setLevel(static_cast<LogLevel>(args[0].asNumber().toInt32() - 1));
conf->logger->setLevel(static_cast<LogLevel>(args[0].asNumber().toInt32() - 1));
return Boolean::newBoolean(true);
}
CATCH("Fail in SetLogLevel!")
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/api/ScriptAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ Local<Value> ColorLog(const Arguments& args) {
sout << prefix;
for (int i = 1; i < args.size(); ++i) PrintValue(sout, args[i]);
sout << "\x1b[0m";
getEngineOwnData()->plugin->getLogger().info(sout.str());
getEngineOwnData()->logger->info(sout.str());
return Boolean::newBoolean(true);
}
CATCH("Fail in Log!");
CATCH("Fail in ColorLog!");
}

Local<Value> FastLog(const Arguments& args) {
Expand Down

0 comments on commit d6b589c

Please sign in to comment.