Change: reworked the debug levels for network facility (#9251)
It now follows very simple rules: 0 - Fatal, user should know about this 1 - Error, but we are recovering 2 - Warning, wrong but okay if you don't know 3 - Info, information you might care about 4 - 5 - Debug #1 - High level debug messages 6 - Debug #2 - Low level debug messages 7 - Trace information
This commit is contained in:
@@ -90,7 +90,7 @@ SendPacketsState NetworkTCPSocketHandler::SendPackets(bool closing_down)
|
||||
if (!err.WouldBlock()) {
|
||||
/* Something went wrong.. close client! */
|
||||
if (!closing_down) {
|
||||
DEBUG(net, 0, "send failed with error %s", err.AsString());
|
||||
DEBUG(net, 0, "Send failed: %s", err.AsString());
|
||||
this->CloseConnection();
|
||||
}
|
||||
return SPS_CLOSED;
|
||||
@@ -139,7 +139,7 @@ Packet *NetworkTCPSocketHandler::ReceivePacket()
|
||||
NetworkError err = NetworkError::GetLast();
|
||||
if (!err.WouldBlock()) {
|
||||
/* Something went wrong... */
|
||||
if (!err.IsConnectionReset()) DEBUG(net, 0, "recv failed with error %s", err.AsString());
|
||||
if (!err.IsConnectionReset()) DEBUG(net, 0, "Recv failed: %s", err.AsString());
|
||||
this->CloseConnection();
|
||||
return nullptr;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ Packet *NetworkTCPSocketHandler::ReceivePacket()
|
||||
NetworkError err = NetworkError::GetLast();
|
||||
if (!err.WouldBlock()) {
|
||||
/* Something went wrong... */
|
||||
if (!err.IsConnectionReset()) DEBUG(net, 0, "recv failed with error %s", err.AsString());
|
||||
if (!err.IsConnectionReset()) DEBUG(net, 0, "Recv failed: %s", err.AsString());
|
||||
this->CloseConnection();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user