Browse Source

[WebUI] Improve log messages

adaptive-webui-19844
Chocobo1 7 years ago
parent
commit
157b809e21
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 5
      src/webui/webui.cpp

5
src/webui/webui.cpp

@ -99,10 +99,11 @@ void WebUI::init()
? QHostAddress::Any : QHostAddress(serverAddressString); ? QHostAddress::Any : QHostAddress(serverAddressString);
bool success = m_httpServer->listen(address, m_port); bool success = m_httpServer->listen(address, m_port);
if (success) { if (success) {
logger->addMessage(tr("Web UI: Now listening on port %1").arg(m_port)); logger->addMessage(tr("Web UI: Now listening on IP: %1, port: %2").arg(serverAddressString).arg(m_port));
} }
else { else {
const QString errorMsg = tr("Web UI: Unable to bind to port %1. %2").arg(m_port).arg(m_httpServer->errorString()); const QString errorMsg = tr("Web UI: Unable to bind to IP: %1, port: %2. Reason: %3")
.arg(serverAddressString).arg(m_port).arg(m_httpServer->errorString());
logger->addMessage(errorMsg, Log::CRITICAL); logger->addMessage(errorMsg, Log::CRITICAL);
#ifdef DISABLE_GUI #ifdef DISABLE_GUI
qCritical() << errorMsg; qCritical() << errorMsg;

Loading…
Cancel
Save