Merge PR #186: Add some better debug prints
This commit is contained in:
commit
d97c1f6abf
@ -311,6 +311,7 @@ void JsonRpcClient::sendRequest(const QVariantMap &request)
|
|||||||
void JsonRpcClient::onInterfaceConnectedChanged(bool connected)
|
void JsonRpcClient::onInterfaceConnectedChanged(bool connected)
|
||||||
{
|
{
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
|
qDebug() << "JsonRpcClient: Transport disconnected.";
|
||||||
m_initialSetupRequired = false;
|
m_initialSetupRequired = false;
|
||||||
m_authenticationRequired = false;
|
m_authenticationRequired = false;
|
||||||
if (m_connected) {
|
if (m_connected) {
|
||||||
@ -318,6 +319,7 @@ void JsonRpcClient::onInterfaceConnectedChanged(bool connected)
|
|||||||
emit connectedChanged(false);
|
emit connectedChanged(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
qDebug() << "JsonRpcClient: Transport connected. Starting handshake.";
|
||||||
QVariantMap params;
|
QVariantMap params;
|
||||||
params.insert("locale", QLocale().name());
|
params.insert("locale", QLocale().name());
|
||||||
sendCommand("JSONRPC.Hello", params, this, "helloReply");
|
sendCommand("JSONRPC.Hello", params, this, "helloReply");
|
||||||
|
|||||||
@ -30,7 +30,6 @@ AppLogController::AppLogController(QObject *parent) : QAbstractListModel(parent)
|
|||||||
|
|
||||||
QString fileName = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/nymea-app.log";
|
QString fileName = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/nymea-app.log";
|
||||||
m_logFile.setFileName(fileName);
|
m_logFile.setFileName(fileName);
|
||||||
qDebug() << "App log file:" << fileName;
|
|
||||||
|
|
||||||
if (QFile::exists(fileName)) {
|
if (QFile::exists(fileName)) {
|
||||||
if (QFile::exists(fileName + ".old")) {
|
if (QFile::exists(fileName + ".old")) {
|
||||||
@ -44,7 +43,6 @@ AppLogController::AppLogController(QObject *parent) : QAbstractListModel(parent)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug() << "Logging is" << (enabled() ? "enabled" : "disabled");
|
|
||||||
if (enabled()) {
|
if (enabled()) {
|
||||||
activate();
|
activate();
|
||||||
}
|
}
|
||||||
@ -143,7 +141,8 @@ void AppLogController::append(const QString &message, AppLogController::Type typ
|
|||||||
|
|
||||||
void AppLogController::activate()
|
void AppLogController::activate()
|
||||||
{
|
{
|
||||||
qDebug() << "Activating log file writing";
|
qDebug() << "Activating log file writing to" << m_logFile.fileName();
|
||||||
|
|
||||||
s_oldLogMessageHandler = qInstallMessageHandler(&logMessageHandler);
|
s_oldLogMessageHandler = qInstallMessageHandler(&logMessageHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,6 +89,7 @@ int main(int argc, char *argv[])
|
|||||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||||
application.installTranslator(&qtTranslator);
|
application.installTranslator(&qtTranslator);
|
||||||
|
|
||||||
|
qDebug() << "nymea:app" << APP_VERSION << "running on" << QSysInfo::machineHostName() << QSysInfo::prettyProductName() << QSysInfo::productType() << QSysInfo::productVersion();
|
||||||
qDebug() << "Locale info:" << QLocale() << QLocale().name() << QLocale().language() << QLocale().system();
|
qDebug() << "Locale info:" << QLocale() << QLocale().name() << QLocale().language() << QLocale().system();
|
||||||
|
|
||||||
QTranslator appTranslator;
|
QTranslator appTranslator;
|
||||||
@ -100,8 +101,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
application.installTranslator(&appTranslator);
|
application.installTranslator(&appTranslator);
|
||||||
|
|
||||||
qDebug() << "Running on" << QSysInfo::machineHostName() << QSysInfo::prettyProductName() << QSysInfo::productType() << QSysInfo::productVersion();
|
|
||||||
|
|
||||||
registerQmlTypes();
|
registerQmlTypes();
|
||||||
|
|
||||||
QQmlApplicationEngine *engine = new QQmlApplicationEngine();
|
QQmlApplicationEngine *engine = new QQmlApplicationEngine();
|
||||||
|
|||||||
@ -21,7 +21,7 @@ Page {
|
|||||||
// This one prefers https over http...
|
// This one prefers https over http...
|
||||||
// if (config === null || (!config.sslEnabled && tmp.sslEnabled)) {
|
// if (config === null || (!config.sslEnabled && tmp.sslEnabled)) {
|
||||||
|
|
||||||
// ...but for now, prefer http because some things won't work with self signed certs etc...
|
// ...but for now, prefer http because self signed certs cause trouble and this is meant for local debugging only anyways...
|
||||||
if (config === null || (config.sslEnabled && !tmp.sslEnabled)) {
|
if (config === null || (config.sslEnabled && !tmp.sslEnabled)) {
|
||||||
config = tmp;
|
config = tmp;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user