Cleanup a lot of the logging in the sysadm server. Now the hostinfo log file will clearly list connection time/IP, auth attempts/IP, Dispatches/IP, disconnections/IP. The dispatcher and events systems also properly log activity within their individual log files.

This commit is contained in:
Ken Moore
2016-02-02 13:46:23 -05:00
parent 3c991ebf4c
commit 8166ef8a79
10 changed files with 48 additions and 35 deletions

View File

@@ -145,7 +145,7 @@ void WebServer::NewSocketConnection(){
}
}
if(sock==0){ return; } //no new connection
qDebug() << "New Socket Connection";
//qDebug() << "New Socket Connection";
connect(sock, SIGNAL(SocketClosed(QString)), this, SLOT(SocketClosed(QString)) );
connect(EVENTS, SIGNAL(NewEvent(EventWatcher::EVENT_TYPE, QJsonValue)), sock, SLOT(EventUpdate(EventWatcher::EVENT_TYPE, QJsonValue)) );
OpenSockets << sock;
@@ -161,6 +161,7 @@ void WebServer::BlackListConnection(QHostAddress addr){
//Make sure this is not the localhost (never block that)
if(addr!= QHostAddress(QHostAddress::LocalHost) && addr != QHostAddress(QHostAddress::LocalHostIPv6) ){
//Block this remote host
LogManager::log(LogManager::HOST,"Blacklisting IP Temporarily: "+addr.toString());
CONFIG->setValue("blacklist/"+addr.toString(), QDateTime::currentDateTime());
}
}