mirror of
https://github.com/DaKerboul/perun.git
synced 2026-08-09 17:55:38 +02:00
Logging improvment - GUI and log file shall be much easier to read and contain more information
This commit is contained in:
@@ -126,7 +126,7 @@ public class TCPController
|
||||
if (Int32.Parse(strRawTCPFrameType) != 0)
|
||||
{
|
||||
// Add to mySQL send buffer (find first empty slot)
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP packet received, type: " + strRawTCPFrameType, 2);
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "Packet received" , 2,0, strRawTCPFrameType,true);
|
||||
for (int i = 0; i < arrMySQLSendBuffer.Length - 1; i++)
|
||||
{
|
||||
if (arrMySQLSendBuffer[i] == null)
|
||||
@@ -138,7 +138,7 @@ public class TCPController
|
||||
} else
|
||||
{
|
||||
// Keep alive
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "Keep-alive received", 2);
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "Keep-alive received", 2,0,"0",true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -150,7 +150,7 @@ public class TCPController
|
||||
{
|
||||
Globals.intGameErros++;
|
||||
Console.WriteLine(e.ToString());
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "ERROR while message parsing , error: " + e.Message,2,1);
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "ERROR while message parsing , error: " + e.Message,2,1,"?");
|
||||
bTCPConnectionOnline = false;
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ public class TCPController
|
||||
catch (SocketException e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP ERROR cannot check connection, error: " + e.Message,2,1);
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP ERROR cannot check connection, error: " + e.Message,2,1,"?");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public class TCPController
|
||||
{
|
||||
Globals.intGameErros++;
|
||||
Console.WriteLine(e.ToString());
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP error - connection closed or port in use, error: " + e.Message,1,1);
|
||||
PerunHelper.GUILogHistoryAdd(ref arrGUILogHistory, "TCP error - connection closed or port in use, error: " + e.Message,1,1,"?");
|
||||
bTCPConnectionOnline = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user