diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 19:32:23 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 19:32:23 +1000 |
commit | f73cb3ce03c35770605ce83a49906cc4825c00a6 (patch) | |
tree | 5f2d405596418e003da830cf05033b6b5110132b /source/game/StarWorldServerThread.cpp | |
parent | 0d266bebe12f01e0035619ef927430e0c1afaf98 (diff) |
improve WorldServer debug logging
is now consistent with WorldServerThread's use of the world id, which is generally more appropriate
Diffstat (limited to 'source/game/StarWorldServerThread.cpp')
-rw-r--r-- | source/game/StarWorldServerThread.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/game/StarWorldServerThread.cpp b/source/game/StarWorldServerThread.cpp index d3bcbc4..c31ae84 100644 --- a/source/game/StarWorldServerThread.cpp +++ b/source/game/StarWorldServerThread.cpp @@ -13,7 +13,10 @@ WorldServerThread::WorldServerThread(WorldServerPtr server, WorldId worldId) m_worldServer(move(server)), m_worldId(move(worldId)), m_stop(false), - m_errorOccurred(false) {} + m_errorOccurred(false) { + if (m_worldServer) + m_worldServer->setWorldId(printWorldId(m_worldId)); +} WorldServerThread::~WorldServerThread() { m_stop = true; @@ -195,7 +198,7 @@ void WorldServerThread::run() { while (!m_stop && !m_errorOccurred) { auto fidelity = lockedFidelity.value(automaticFidelity); LogMap::set(strf("server_{}_fidelity", m_worldId), WorldServerFidelityNames.getRight(fidelity)); - LogMap::set(strf("server_{}_update_fps", m_worldId), tickApproacher.rate()); + LogMap::set(strf("server_{}_update", m_worldId), strf("{:4.2f}Hz", tickApproacher.rate())); update(fidelity); tickApproacher.tick(); |