Improve aws debug output
This commit is contained in:
parent
adee6b62be
commit
27c72096e7
@ -99,7 +99,6 @@ void AuthenticationProcess::onDynamicCredentialsReady()
|
|||||||
void AuthenticationProcess::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
void AuthenticationProcess::onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||||
{
|
{
|
||||||
qCDebug(dcAuthenticationProcess()) << "Authentication process finished (" << m_processTimer.elapsed() << "[ms] )";;
|
qCDebug(dcAuthenticationProcess()) << "Authentication process finished (" << m_processTimer.elapsed() << "[ms] )";;
|
||||||
|
|
||||||
if (exitStatus == QProcess::CrashExit) {
|
if (exitStatus == QProcess::CrashExit) {
|
||||||
qCWarning(dcAuthenticationProcess()) << "Authentication process crashed:" << endl << qUtf8Printable(m_process->readAll());
|
qCWarning(dcAuthenticationProcess()) << "Authentication process crashed:" << endl << qUtf8Printable(m_process->readAll());
|
||||||
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
||||||
@ -113,7 +112,6 @@ void AuthenticationProcess::onProcessFinished(int exitCode, QProcess::ExitStatus
|
|||||||
}
|
}
|
||||||
|
|
||||||
QFile resultFile(m_resultFileName);
|
QFile resultFile(m_resultFileName);
|
||||||
|
|
||||||
if (!resultFile.exists()) {
|
if (!resultFile.exists()) {
|
||||||
qCWarning(dcAuthenticationProcess()) << "The process output file does not exist.";
|
qCWarning(dcAuthenticationProcess()) << "The process output file does not exist.";
|
||||||
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
||||||
@ -128,6 +126,8 @@ void AuthenticationProcess::onProcessFinished(int exitCode, QProcess::ExitStatus
|
|||||||
|
|
||||||
QByteArray resultData = resultFile.readAll();
|
QByteArray resultData = resultFile.readAll();
|
||||||
|
|
||||||
|
qCDebug(dcAuthenticationProcess()) << "Lambda function result ready" << qUtf8Printable(resultData);
|
||||||
|
|
||||||
resultFile.close();
|
resultFile.close();
|
||||||
if (!resultFile.remove()) {
|
if (!resultFile.remove()) {
|
||||||
qCWarning(dcAuthenticationProcess()) << "Could not clean up result file from process:" << resultFile.errorString();
|
qCWarning(dcAuthenticationProcess()) << "Could not clean up result file from process:" << resultFile.errorString();
|
||||||
@ -136,7 +136,6 @@ void AuthenticationProcess::onProcessFinished(int exitCode, QProcess::ExitStatus
|
|||||||
|
|
||||||
QJsonParseError error;
|
QJsonParseError error;
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(resultData, &error);
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(resultData, &error);
|
||||||
|
|
||||||
if(error.error != QJsonParseError::NoError) {
|
if(error.error != QJsonParseError::NoError) {
|
||||||
qCWarning(dcAuthenticationProcess()) << "Failed to parse lambda invoke result data" << resultData << ":" << error.errorString();
|
qCWarning(dcAuthenticationProcess()) << "Failed to parse lambda invoke result data" << resultData << ":" << error.errorString();
|
||||||
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
emit authenticationFinished(Authenticator::AuthenticationErrorProxyError);
|
||||||
|
|||||||
@ -184,13 +184,13 @@ QDebug operator<<(QDebug debug, ProxyConfiguration *configuration)
|
|||||||
debug.nospace() << " - certificate:" << configuration->sslCertificateFileName() << endl;
|
debug.nospace() << " - certificate:" << configuration->sslCertificateFileName() << endl;
|
||||||
debug.nospace() << " - certificate key:" << configuration->sslCertificateKeyFileName() << endl;
|
debug.nospace() << " - certificate key:" << configuration->sslCertificateKeyFileName() << endl;
|
||||||
debug.nospace() << " - SSL certificate information:";
|
debug.nospace() << " - SSL certificate information:";
|
||||||
debug.nospace() << " Common name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::CommonName);
|
debug.nospace() << " Common name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::CommonName) << endl;
|
||||||
debug.nospace() << " Organisation:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::Organization);
|
debug.nospace() << " Organisation:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::Organization) << endl;
|
||||||
debug.nospace() << " Organisation unit name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::OrganizationalUnitName);
|
debug.nospace() << " Organisation unit name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::OrganizationalUnitName) << endl;
|
||||||
debug.nospace() << " Country name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::CountryName);
|
debug.nospace() << " Country name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::CountryName) << endl;
|
||||||
debug.nospace() << " Locality name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::LocalityName);
|
debug.nospace() << " Locality name:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::LocalityName) << endl;
|
||||||
debug.nospace() << " State/Province:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::StateOrProvinceName);
|
debug.nospace() << " State/Province:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::StateOrProvinceName) << endl;
|
||||||
debug.nospace() << " Email address:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::EmailAddress);
|
debug.nospace() << " Email address:" << configuration->sslConfiguration().localCertificate().issuerInfo(QSslCertificate::EmailAddress) << endl;
|
||||||
debug.nospace() << "WebSocketServer" << endl;
|
debug.nospace() << "WebSocketServer" << endl;
|
||||||
debug.nospace() << " - host:" << configuration->webSocketServerHost().toString() << endl;
|
debug.nospace() << " - host:" << configuration->webSocketServerHost().toString() << endl;
|
||||||
debug.nospace() << " - port:" << configuration->webSocketServerPort() << endl;
|
debug.nospace() << " - port:" << configuration->webSocketServerPort() << endl;
|
||||||
|
|||||||
@ -78,7 +78,7 @@ void ProxyServer::establishTunnel(ProxyClient *firstClient, ProxyClient *secondC
|
|||||||
TunnelConnection tunnel(firstClient, secondClient);
|
TunnelConnection tunnel(firstClient, secondClient);
|
||||||
if (!tunnel.isValid()) {
|
if (!tunnel.isValid()) {
|
||||||
qCWarning(dcProxyServer()) << "Invalid tunnel. Could not establish connection.";
|
qCWarning(dcProxyServer()) << "Invalid tunnel. Could not establish connection.";
|
||||||
// FIXME
|
//FIXME:
|
||||||
}
|
}
|
||||||
|
|
||||||
m_tunnels.insert(tunnel.token(), tunnel);
|
m_tunnels.insert(tunnel.token(), tunnel);
|
||||||
|
|||||||
@ -92,14 +92,16 @@ int main(int argc, char *argv[])
|
|||||||
application.setOrganizationName("guh");
|
application.setOrganizationName("guh");
|
||||||
application.setApplicationVersion(SERVER_VERSION_STRING);
|
application.setApplicationVersion(SERVER_VERSION_STRING);
|
||||||
|
|
||||||
s_loggingFilters.insert("Engine", true);
|
|
||||||
s_loggingFilters.insert("Application", true);
|
s_loggingFilters.insert("Application", true);
|
||||||
|
s_loggingFilters.insert("Engine", true);
|
||||||
s_loggingFilters.insert("JsonRpc", true);
|
s_loggingFilters.insert("JsonRpc", true);
|
||||||
s_loggingFilters.insert("JsonRpcTraffic", true);
|
s_loggingFilters.insert("JsonRpcTraffic", false);
|
||||||
s_loggingFilters.insert("WebSocketServer", true);
|
s_loggingFilters.insert("WebSocketServer", true);
|
||||||
s_loggingFilters.insert("WebSocketServerTraffic", false);
|
s_loggingFilters.insert("WebSocketServerTraffic", false);
|
||||||
s_loggingFilters.insert("Authentication", true);
|
s_loggingFilters.insert("Authentication", true);
|
||||||
|
s_loggingFilters.insert("AuthenticationProcess", true);
|
||||||
s_loggingFilters.insert("ProxyServer", true);
|
s_loggingFilters.insert("ProxyServer", true);
|
||||||
|
s_loggingFilters.insert("ProxyServerTraffic", false);
|
||||||
|
|
||||||
QString configFile = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).first() + "/nymea/nymea-remoteproxy.conf";
|
QString configFile = QStandardPaths::standardLocations(QStandardPaths::ConfigLocation).first() + "/nymea/nymea-remoteproxy.conf";
|
||||||
|
|
||||||
@ -147,9 +149,9 @@ int main(int argc, char *argv[])
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (parser.isSet(verboseOption)) {
|
if (parser.isSet(verboseOption)) {
|
||||||
s_loggingFilters["Debug"] = true;
|
s_loggingFilters["JsonRpcTraffic"] = true;
|
||||||
|
s_loggingFilters["ProxyServerTraffic"] = true;
|
||||||
s_loggingFilters["WebSocketServerTraffic"] = true;
|
s_loggingFilters["WebSocketServerTraffic"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user