diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2021-12-30 20:44:59 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-30 20:44:59 -0600 |
| commit | 6e1e847750dc593bcb2571c9775b2db11661cdb2 (patch) | |
| tree | d744ace687e5a603e00daae604cb1a5a35de6795 /src/demoserver.cpp | |
| parent | 593bd54000be14c9a1455914285c1b2549b0fa51 (diff) | |
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.
Diffstat (limited to 'src/demoserver.cpp')
| -rw-r--r-- | src/demoserver.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 <QString> 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(); |
