From 6e1e847750dc593bcb2571c9775b2db11661cdb2 Mon Sep 17 00:00:00 2001 From: oldmud0 Date: Thu, 30 Dec 2021 20:44:59 -0600 Subject: Add and refine debug log messages (#625) Since these are going to be visible to the user now, at least let's properly format them and make them somewhat helpful. --- src/demoserver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/demoserver.cpp') diff --git a/src/demoserver.cpp b/src/demoserver.cpp index db5e1bc5..800d282e 100644 --- a/src/demoserver.cpp +++ b/src/demoserver.cpp @@ -21,7 +21,7 @@ void DemoServer::start_server() return; } this->port = tcp_server->serverPort(); - qDebug() << "Server started"; + qInfo() << "Demo server started at port" << port; server_started = true; } @@ -63,7 +63,7 @@ void DemoServer::accept_connection() if (client_sock) { // Client is already connected... - qDebug() << "Multiple connections to demo server disallowed."; + qWarning() << "Multiple connections to demo server disallowed."; QTcpSocket* temp_socket = tcp_server->nextPendingConnection(); connect(temp_socket, &QAbstractSocket::disconnected, temp_socket, &QObject::deleteLater); temp_socket->disconnectFromHost(); @@ -269,7 +269,7 @@ void DemoServer::load_demo(QString filename) // No-shenanigans 2.9.0 demo file with the dreaded demo desync bug detected https://github.com/AttorneyOnline/AO2-Client/pull/496 // If we don't start with the SC packet this means user-edited weirdo shenanigans. Don't screw around with those. if (demo_data.head().startsWith("SC#") && demo_data.last().startsWith("wait#")) { - qDebug() << "Loaded a broken pre-2.9.1 demo file, with the wait desync issue!"; + qInfo() << "Loaded a broken pre-2.9.1 demo file, with the wait desync issue!"; QMessageBox *msgBox = new QMessageBox; msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setTextFormat(Qt::RichText); @@ -281,7 +281,7 @@ void DemoServer::load_demo(QString filename) QQueue p_demo_data; switch (ret) { case QMessageBox::Yes: - qDebug() << "Making a backup of the broken demo..."; + qInfo() << "Making a backup of the broken demo..."; QFile::copy(filename, filename + ".backup"); while (!demo_data.isEmpty()) { QString current_packet = demo_data.dequeue(); -- cgit