diff options
Diffstat (limited to 'zenutil/zenserverprocess.cpp')
| -rw-r--r-- | zenutil/zenserverprocess.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/zenutil/zenserverprocess.cpp b/zenutil/zenserverprocess.cpp index 4e45ddfae..093f18f6a 100644 --- a/zenutil/zenserverprocess.cpp +++ b/zenutil/zenserverprocess.cpp @@ -403,6 +403,7 @@ ZenServerInstance::SpawnServer(int BasePort) if (BasePort) { CommandLine << " --port " << BasePort; + m_BasePort = BasePort; } if (!m_TestDir.empty()) @@ -418,7 +419,7 @@ ZenServerInstance::SpawnServer(int BasePort) std::filesystem::path CurrentDirectory = std::filesystem::current_path(); - spdlog::debug("Spawning server"); + spdlog::debug("Spawning server '{}'", LogId); PROCESS_INFORMATION ProcessInfo{}; STARTUPINFO StartupInfo{.cb = sizeof(STARTUPINFO)}; @@ -492,7 +493,7 @@ ZenServerInstance::SpawnServer(int BasePort) } } - spdlog::debug("Server spawned OK"); + spdlog::debug("Server '{}' spawned OK", LogId); if (IsTest) { @@ -558,3 +559,13 @@ ZenServerInstance::WaitUntilReady(int Timeout) { return m_ReadyEvent.Wait(Timeout); } + +std::string +ZenServerInstance::GetBaseUri() const +{ + ZEN_ASSERT(m_BasePort); + + using namespace fmt::literals; + + return "http://localhost:{}"_format(m_BasePort); +} |