Added logging for server using syslog.

This commit is contained in:
lotodore
2007-10-23 21:26:07 +00:00
parent ae030a3669
commit b4848532f9
12 changed files with 175 additions and 111 deletions
+8 -4
View File
@@ -22,8 +22,10 @@
#include "tools.h"
#include "cardsvalue.h"
#include <configfile.h>
#include <core/loghelper.h>
#include <fstream>
#include <sstream>
using namespace std;
@@ -3524,7 +3526,7 @@ void LocalPlayer::calcMyOdds() {
break;
}
}
if(myOdds == -1) cout << "ERROR myOdds - " << handCode << endl;
if (myOdds == -1) LOG_ERROR(__FILE__ << " (" << __LINE__ << "): ERROR myOdds - " << handCode);
}
break;
@@ -3559,8 +3561,10 @@ void LocalPlayer::calcMyOdds() {
}
}
if(myOdds == -1) {
cout << "ERROR" << endl;
for(i=0; i<5; i++) cout << tempArray[i] << " ";
ostringstream logger;
logger << "ERROR myOdds is -1: ";
for(i=0; i<5; i++) logger << tempArray[i] << " ";
LOG_ERROR(__FILE__ << " (" << __LINE__ << "): " << logger.str());
// cout << "\t" << handCode << "\t" << myID << endl;
} else {
// cout << myHoleCardsValue << endl;
@@ -3679,7 +3683,7 @@ void LocalPlayer::calcMyOdds() {
}
break;
default: cout <<"ERROR - wrong init of currentRound" << endl;
default: LOG_ERROR(__FILE__ << " (" << __LINE__ << "): ERROR - wrong init of currentRound");
}