From 0cc32cae5e3fb832bbad584ce86a308dc6104c46 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 26 Aug 2025 14:05:15 +0200 Subject: rework `--quiet` zenserver option add `--noconsole` option (#477) - Improvement: Changed zenserver `--quiet` option to suppress INFO level messages and below to surface startup and runtime errors - Feature: Added `--noconsole` option that suppresses all output to standard out, this works as the `--quiet` option used to work --- src/zenserver/zenserver.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/zenserver/zenserver.cpp') diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp index 48a2dad95..44c25368c 100644 --- a/src/zenserver/zenserver.cpp +++ b/src/zenserver/zenserver.cpp @@ -187,7 +187,14 @@ ZenServer::Initialize(const ZenServerOptions& ServerOptions, ZenServerState::Zen m_Http = CreateHttpServer(ServerOptions.HttpServerConfig); int EffectiveBasePort = m_Http->Initialize(ServerOptions.BasePort, ServerOptions.DataDir); - ZEN_ASSERT(EffectiveBasePort > 0); + if (EffectiveBasePort == 0) + { + ZEN_WARN("Failed to initialize http service '{}' using base port {} and data dir {}", + ServerOptions.HttpServerConfig.ServerClass, + ServerOptions.BasePort, + ServerOptions.DataDir); + return -1; + } // Setup authentication manager { @@ -198,7 +205,10 @@ ZenServer::Initialize(const ZenServerOptions& ServerOptions, ZenServerState::Zen { EncryptionKey = "abcdefghijklmnopqrstuvxyz0123456"; - ZEN_WARN("using default encryption key"); + if (ServerOptions.IsDedicated) + { + ZEN_WARN("Using default encryption key for authentication state"); + } } std::string EncryptionIV = ServerOptions.EncryptionIV; @@ -207,7 +217,10 @@ ZenServer::Initialize(const ZenServerOptions& ServerOptions, ZenServerState::Zen { EncryptionIV = "0123456789abcdef"; - ZEN_WARN("using default encryption initialization vector"); + if (ServerOptions.IsDedicated) + { + ZEN_WARN("Using default encryption initialization vector for authentication state"); + } } m_AuthMgr = AuthMgr::Create({.RootDirectory = m_DataRoot / "auth", -- cgit v1.2.3