wsd/LOOLWSD.cpp | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-)
New commits: commit d4fa74916c3f18af037e4e36985070badce55456 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Wed Jul 1 12:19:39 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Wed Jul 1 15:15:19 2020 +0200 Unconditionally display & log version on start & in dumpState. Hopefully makes our logs generally much more useful. Change-Id: I6e7a96792e322fc40eb7dda1aa16a2a4ada07df6 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97615 Tested-by: Jenkins Tested-by: Michael Meeks <michael.me...@collabora.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 5d3b17808..3d3f2f290 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -219,10 +219,6 @@ int LOOLWSD::prisonerServerSocketFD; #else -/// New LOK child processes ready to host documents. -//TODO: Move to a more sensible namespace. -static bool DisplayVersion = false; - /// Funky latency simulation basic delay (ms) static int SimulatedLatencyMs = 0; @@ -1576,7 +1572,7 @@ void LOOLWSD::handleOption(const std::string& optionName, std::exit(EX_OK); } else if (optionName == "version") - DisplayVersion = true; + ; // ignore for compatibility else if (optionName == "cleanup") CleanupOnly = true; // Flag for later as we need the config. else if (optionName == "port") @@ -1836,8 +1832,7 @@ bool LOOLWSD::createForKit() if (UnitWSD::get().hasKitHooks()) args.push_back("--unitlib=" + UnitTestLibrary); - if (DisplayVersion) - args.push_back("--version"); + args.push_back("--version"); if (NoCapsForKit) args.push_back("--nocaps"); @@ -3513,8 +3508,12 @@ public: Socket::InhibitThreadChecks = true; SocketPoll::InhibitThreadChecks = true; - os << "LOOLWSDServer:" + std::string version, hash; + Util::getVersionInfo(version, hash); + + os << "LOOLWSDServer: " << version << " - " << hash #if !MOBILEAPP + << "\n Kit version: " << LOOLWSD::LOKitVersion << "\n Ports: server " << ClientPortNumber << " prisoner " << MasterLocation << "\n SSL: " << (LOOLWSD::isSSLEnabled() ? "https" : "http") << "\n SSL-Termination: " << (LOOLWSD::isSSLTermination() ? "yes" : "no") @@ -3734,19 +3733,17 @@ int LOOLWSD::innerMain() SigUtil::setTerminationSignals(); #endif -#ifdef __linux +#if !MOBILEAPP +# ifdef __linux // down-pay all the forkit linking cost once & early. setenv("LD_BIND_NOW", "1", 1); +# endif -#if !MOBILEAPP HostIdentifier = Util::rng::getHexString(8); - if (DisplayVersion) - { - std::string version, hash; - Util::getVersionInfo(version, hash); - LOG_INF("Loolwsd version details: " << version << " - " << hash << " - id " << HostIdentifier << " - on " << Util::getLinuxVersion()); - } -#endif + + std::string version, hash; + Util::getVersionInfo(version, hash); + LOG_INF("Loolwsd version details: " << version << " - " << hash << " - id " << HostIdentifier << " - on " << Util::getLinuxVersion()); #endif initializeSSL(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits