1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-17 17:08:39 +00:00

Overall improvements to log messages (#9598)

Hide some unnecessarily verbose ones behind --trace or disable them entirely.
Remove duplicate ones. Improve their contents in some places.
This commit is contained in:
sfan5 2020-04-08 20:13:23 +02:00 committed by GitHub
parent 3494475df1
commit de73f989eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 87 additions and 111 deletions

View file

@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "log.h"
#include "scripting_server.h"
#include "content/subgames.h"
#include "porting.h"
/**
* Manage server mods
@ -66,14 +67,10 @@ void ServerModManager::loadMods(ServerScripting *script)
"Only characters [a-z0-9_] are allowed.");
}
std::string script_path = mod.path + DIR_DELIM + "init.lua";
infostream << " [" << padStringRight(mod.name, 12) << "] [\""
<< script_path << "\"]" << std::endl;
auto t = std::chrono::steady_clock::now();
auto t = porting::getTimeMs();
script->loadMod(script_path, mod.name);
infostream << "Mod \"" << mod.name << "\" loaded after "
<< std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::steady_clock::now() - t).count() * 0.001f
<< " seconds" << std::endl;
<< (porting::getTimeMs() - t) << " ms" << std::endl;
}
// Run a callback when mods are loaded