From 2cd31bef444c1ecae9b7e4ef7ca43b9f5dd4222d Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 11 May 2023 16:07:40 +0200 Subject: allow early logging (#292) * if logging is not initialized, just log to console * changelog --- src/zenserver/zenserver.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/zenserver/zenserver.cpp') diff --git a/src/zenserver/zenserver.cpp b/src/zenserver/zenserver.cpp index 826924952..f9221ed0f 100644 --- a/src/zenserver/zenserver.cpp +++ b/src/zenserver/zenserver.cpp @@ -1095,7 +1095,7 @@ ZenEntryPoint::Run() { if (ServerOptions.OwnerPid) { - ConsoleLog().info( + ZEN_INFO( "Looks like there is already a process listening to this port {} (pid: {}), attaching owner pid {} to running instance", ServerOptions.BasePort, Entry->Pid, @@ -1107,9 +1107,7 @@ ZenEntryPoint::Run() } else { - ConsoleLog().warn("Exiting since there is already a process listening to port {} (pid: {})", - ServerOptions.BasePort, - Entry->Pid); + ZEN_WARN("Exiting since there is already a process listening to port {} (pid: {})", ServerOptions.BasePort, Entry->Pid); std::exit(1); } } @@ -1131,7 +1129,7 @@ ZenEntryPoint::Run() if (Ec) { - ConsoleLog().warn("ERROR: Unable to grab lock at '{}' (error: '{}')", LockFilePath, Ec.message()); + ZEN_WARN("ERROR: Unable to grab lock at '{}' (error: '{}')", LockFilePath, Ec.message()); std::exit(99); } -- cgit v1.2.3