Skip to content

Commit d6b589c

Browse files
committed
fix: fix Logger::setLogLevel & ColorLog
1 parent 81a33f0 commit d6b589c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/legacy/api/LoggerAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Local<Value> LoggerClass::setLogLevel(const Arguments& args) {
193193

194194
try {
195195
auto conf = getEngineOwnData();
196-
conf->plugin->getLogger().setLevel(static_cast<LogLevel>(args[0].asNumber().toInt32() - 1));
196+
conf->logger->setLevel(static_cast<LogLevel>(args[0].asNumber().toInt32() - 1));
197197
return Boolean::newBoolean(true);
198198
}
199199
CATCH("Fail in SetLogLevel!")

src/legacy/api/ScriptAPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ Local<Value> ColorLog(const Arguments& args) {
8989
sout << prefix;
9090
for (int i = 1; i < args.size(); ++i) PrintValue(sout, args[i]);
9191
sout << "\x1b[0m";
92-
getEngineOwnData()->plugin->getLogger().info(sout.str());
92+
getEngineOwnData()->logger->info(sout.str());
9393
return Boolean::newBoolean(true);
9494
}
95-
CATCH("Fail in Log!");
95+
CATCH("Fail in ColorLog!");
9696
}
9797

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

0 commit comments

Comments
 (0)