T79 Improved log messages.

This commit is contained in:
Mathew Sutcliffe
2017-05-11 16:37:54 +01:00
parent 57b39dcd37
commit f34c48cf6c
3 changed files with 5 additions and 4 deletions

View File

@@ -57,10 +57,11 @@ namespace XSwiftBus
#endif
BlackMisc::setCustomLibraryPath(libraryPath);
if (!BlackMisc::CDBusServer::isP2PAddress(address) && !BlackMisc::CDBusServer::isDBusAvailable(address))
QString message;
if (!BlackMisc::CDBusServer::isP2PAddress(address) && !BlackMisc::CDBusServer::isDBusAvailable(address, message))
{
constexpr int msec = 30000;
BlackMisc::CLogMessage(this).warning("DBus daemon not available. Trying again in %1 sec.") << msec / 1000;
BlackMisc::CLogMessage(this).warning("DBus daemon not available. (%1) Trying again in %2 sec.") << message << (msec / 1000);
QTimer::singleShot(msec, this, [&] { tryStartServer(address); });
BlackMisc::setCustomLibraryPath(previousLibraryPath);
return;