[Server] Clean up logAppend and add new message for server shutdown

new-script-api
David Cernat 7 years ago
parent 381a5fabc4
commit d591180e99

@ -139,7 +139,7 @@ LuaState::LuaState()
LOG_MESSAGE_SIMPLE(level, "[Script]: %s", message);
});
lua->set_function("logAppend", [](unsigned short level, const char *message) {
LOG_APPEND(level, "[Script]: %s", message);
LOG_APPEND(level, "%s", message);
});
lua->set_function("stopServer", [](int code) {

@ -314,6 +314,8 @@ int main(int argc, char *argv[])
if (code == 0)
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Quitting peacefully.");
else if (code == 1)
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "Forcibly shutting down because of error.");
LOG_QUIT();

Loading…
Cancel
Save