Skip to content

Commit

Permalink
Server: Add a more explicit log when the server is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLynix committed Dec 19, 2023
1 parent dac960c commit 3bf8f1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Main/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <Main/Main.hpp>
#include <CommonLib/Version.hpp>
#include <CommonLib/Utility/CrashHandler.hpp>
#include <fmt/color.h>
#include <fmt/format.h>
#include <exception>

Expand All @@ -14,7 +15,7 @@

int TSOMEntry(int argc, char* argv[], int(*mainFunc)(int argc, char* argv[]))
{
fmt::print("TSOM {0}.{1}.{2} {3} ({4}) - {5}\n", tsom::GameMajorVersion, tsom::GameMinorVersion, tsom::GamePatchVersion, tsom::BuildBranch, tsom::BuildCommit, tsom::BuildCommitDate);
fmt::print(fg(fmt::color::white), "TSOM {0}.{1}.{2} {3} ({4}) - {5}\n", tsom::GameMajorVersion, tsom::GameMinorVersion, tsom::GamePatchVersion, tsom::BuildBranch, tsom::BuildCommit, tsom::BuildCommitDate);

#ifdef NAZARA_PLATFORM_WINDOWS
if (IsDebuggerPresent())
Expand Down
3 changes: 3 additions & 0 deletions src/Server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <ServerLib/ServerInstanceAppComponent.hpp>
#include <ServerLib/Session/InitialSessionHandler.hpp>
#include <Main/Main.hpp>
#include <fmt/color.h>

int ServerMain(int argc, char* argv[])
{
Expand All @@ -16,6 +17,8 @@ int ServerMain(int argc, char* argv[])
auto& sessionManager = instance.AddSessionManager(tsom::Constants::ServerPort);
sessionManager.SetDefaultHandler<tsom::InitialSessionHandler>(std::ref(instance));

fmt::print(fg(fmt::color::lime_green), "server ready.\n");

return app.Run();
}

Expand Down

0 comments on commit 3bf8f1e

Please sign in to comment.