aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-04-18 17:48:45 +0200
committerGitHub Enterprise <[email protected]>2024-04-18 17:48:45 +0200
commitf84af894f6c751e3643647229ae2e95d54c0ea31 (patch)
tree5b9c1554e276f455785cf0626881ca789816f975 /src/zenutil/include
parentsafer oplog import (#52) (diff)
downloadzen-f84af894f6c751e3643647229ae2e95d54c0ea31.tar.xz
zen-f84af894f6c751e3643647229ae2e95d54c0ea31.zip
capture zenserver output on error (#51)
* capture spawned server output and output on launch error * fix logging and launch validation in tests
Diffstat (limited to 'src/zenutil/include')
-rw-r--r--src/zenutil/include/zenutil/zenserverprocess.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zenutil/include/zenutil/zenserverprocess.h b/src/zenutil/include/zenutil/zenserverprocess.h
index af5125471..1bd00acb7 100644
--- a/src/zenutil/include/zenutil/zenserverprocess.h
+++ b/src/zenutil/include/zenutil/zenserverprocess.h
@@ -66,7 +66,7 @@ struct ZenServerInstance
ZenServerInstance(ZenServerEnvironment& TestEnvironment);
~ZenServerInstance();
- void Shutdown();
+ int Shutdown();
void SignalShutdown();
uint16_t WaitUntilReady();
[[nodiscard]] bool WaitUntilReady(int Timeout);
@@ -77,6 +77,7 @@ struct ZenServerInstance
inline void SetOwnerPid(int Pid) { m_OwnerPid = Pid; }
bool IsRunning();
bool Terminate();
+ std::string GetLogOutput() const;
void SetTestDir(std::filesystem::path TestDir);
@@ -116,6 +117,7 @@ private:
uint16_t m_BasePort = 0;
std::optional<int> m_OwnerPid;
std::string m_Name;
+ std::filesystem::path m_OutputCapturePath;
void CreateShutdownEvent(int BasePort);
void SpawnServer(int BasePort, std::string_view AdditionalServerArgs, int WaitTimeoutMs);