mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 10:20:26 +00:00
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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user