mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
- more tweaking of threaded logging as well as removal of world synch logging items that are not needed
This commit is contained in:
@@ -1715,7 +1715,28 @@ void Unit::exploreCells() {
|
|||||||
void Unit::logSynchData(string file,int line,string source) {
|
void Unit::logSynchData(string file,int line,string source) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugWorldSynch).enabled == true) {
|
||||||
|
|
||||||
char szBuf[1024]="";
|
char szBuf[4096]="";
|
||||||
|
|
||||||
|
sprintf(szBuf,
|
||||||
|
"FrameCount [%d] Unit = %d [%s][%s] pos = %s, lastPos = %s, targetPos = %s, targetVec = %s, meetingPos = %s, progress [%f], progress2 [%d]\nUnit Path [%s]\n",
|
||||||
|
getFrameCount(),
|
||||||
|
id,
|
||||||
|
getFullName().c_str(),
|
||||||
|
faction->getType()->getName().c_str(),
|
||||||
|
//getDesc().c_str(),
|
||||||
|
pos.getString().c_str(),
|
||||||
|
lastPos.getString().c_str(),
|
||||||
|
targetPos.getString().c_str(),
|
||||||
|
targetVec.getString().c_str(),
|
||||||
|
meetingPos.getString().c_str(),
|
||||||
|
// lastRotation,
|
||||||
|
// targetRotation,
|
||||||
|
// rotation,
|
||||||
|
progress,
|
||||||
|
progress2,
|
||||||
|
(unitPath != NULL ? unitPath->toString().c_str() : "NULL"));
|
||||||
|
|
||||||
|
/*
|
||||||
sprintf(szBuf,
|
sprintf(szBuf,
|
||||||
"FrameCount [%d] Unit = %d [%s][%s] pos = %s, lastPos = %s, targetPos = %s, targetVec = %s, meetingPos = %s, lastRotation [%f], targetRotation [%f], rotation [%f], progress [%f], progress2 [%d]\nUnit Path [%s]\n",
|
"FrameCount [%d] Unit = %d [%s][%s] pos = %s, lastPos = %s, targetPos = %s, targetVec = %s, meetingPos = %s, lastRotation [%f], targetRotation [%f], rotation [%f], progress [%f], progress2 [%d]\nUnit Path [%s]\n",
|
||||||
getFrameCount(),
|
getFrameCount(),
|
||||||
@@ -1734,7 +1755,7 @@ void Unit::logSynchData(string file,int line,string source) {
|
|||||||
progress,
|
progress,
|
||||||
progress2,
|
progress2,
|
||||||
(unitPath != NULL ? unitPath->toString().c_str() : "NULL"));
|
(unitPath != NULL ? unitPath->toString().c_str() : "NULL"));
|
||||||
|
*/
|
||||||
if( lastSynchDataString != string(szBuf) ||
|
if( lastSynchDataString != string(szBuf) ||
|
||||||
lastFile != file ||
|
lastFile != file ||
|
||||||
lastLine != line ||
|
lastLine != line ||
|
||||||
|
@@ -206,6 +206,10 @@ void LogFileThread::addLogEntry(SystemFlags::DebugType type, string logEntry) {
|
|||||||
entry.entry = logEntry;
|
entry.entry = logEntry;
|
||||||
entry.entryDateTime = time(NULL);
|
entry.entryDateTime = time(NULL);
|
||||||
logList.push_back(entry);
|
logList.push_back(entry);
|
||||||
|
|
||||||
|
if(logList.size() >= 100000) {
|
||||||
|
saveToDisk(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LogFileThread::checkSaveCurrentLogBufferToDisk() {
|
bool LogFileThread::checkSaveCurrentLogBufferToDisk() {
|
||||||
|
Reference in New Issue
Block a user