summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-04-08 20:13:23 +0200
committerGitHub <noreply@github.com>2020-04-08 20:13:23 +0200
commitde73f989eb1397b1103236031fd91309b294583c (patch)
treeb2fae6ebca2468b17f7d9648eb63625b6b3712c1 /src/server
parent3494475df108e3401c6c8463a0aeae0f227fd1fa (diff)
downloadminetest-de73f989eb1397b1103236031fd91309b294583c.tar.gz
minetest-de73f989eb1397b1103236031fd91309b294583c.tar.bz2
minetest-de73f989eb1397b1103236031fd91309b294583c.zip
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.
Diffstat (limited to 'src/server')
-rw-r--r--src/server/mods.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/mods.cpp b/src/server/mods.cpp
index c5616dcd6..c8d8a28e2 100644
--- a/src/server/mods.cpp
+++ b/src/server/mods.cpp
@@ -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