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

@@ -124,7 +124,7 @@ namespace BlackMisc
m_stream << " " << QSysInfo::currentCpuArchitecture() << endl;
m_stream << "Built from revision " << CBuildConfig::gitHeadSha1();
m_stream << " on " << CBuildConfig::buildTimestamp().toString() << endl;
m_stream << " on " << CBuildConfig::buildDateAndTime() << endl;
m_stream << "Built with Qt " << QT_VERSION_STR;
m_stream << " and running with Qt " << qVersion();

View File

@@ -728,7 +728,7 @@ namespace BlackSimPlugin
}
else
{
CLogMessage(this).debug() << "Starting XSwiftBus on" << m_xswiftbusServerSetting.getThreadLocal();
CLogMessage(this).debug() << "Watching XSwiftBus on" << m_xswiftbusServerSetting.getThreadLocal();
m_conn = CSimulatorXPlane::connectionFromString(m_xswiftbusServerSetting.getThreadLocal());
m_watcher = new QDBusServiceWatcher(xswiftbusServiceName(), m_conn, QDBusServiceWatcher::WatchForRegistration, this);
connect(m_watcher, &QDBusServiceWatcher::serviceRegistered, this, &CSimulatorXPlaneListener::ps_serviceRegistered);

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;