Changed the logging system to be more flexible and to support world synch logging

This commit is contained in:
Mark Vejvoda
2010-04-27 03:36:36 +00:00
parent 024f86ce7c
commit 6d4838f470
10 changed files with 215 additions and 47 deletions

View File

@@ -256,7 +256,7 @@ bool NetworkMessageCommandList::receive(Socket* socket){
return false;
}
bool result = NetworkMessage::receive(socket, &data, totalMsgSize);
if(SystemFlags::enableNetworkDebugInfo) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled == true) {
for(int idx = 0 ; idx < data.commandCount; ++idx) {
const NetworkCommand &cmd = data.commands[idx];
@@ -272,7 +272,7 @@ void NetworkMessageCommandList::send(Socket* socket) const{
assert(data.messageType==nmtCommandList);
NetworkMessage::send(socket, &data, commandListHeaderSize + sizeof(NetworkCommand) * data.commandCount);
if(SystemFlags::enableNetworkDebugInfo) {
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled == true) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s %d] messageType = %d, frameCount = %d, data.commandCount = %d\n",
__FILE__,__FUNCTION__,__LINE__,data.messageType,data.frameCount,data.commandCount);