mirror of
https://github.com/glest/glest-source.git
synced 2025-09-25 23:19:07 +02:00
- added code to now output all eerors to console (with option to save in log file)
- added more LUA debug info
This commit is contained in:
@@ -151,12 +151,13 @@ CURL *SystemFlags::initHTTP() {
|
||||
void SystemFlags::init(bool haveSpecialOutputCommandLineOption) {
|
||||
SystemFlags::haveSpecialOutputCommandLineOption = haveSpecialOutputCommandLineOption;
|
||||
if(SystemFlags::debugLogFileList.size() == 0) {
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugSystem] = SystemFlags::SystemFlagsType(SystemFlags::debugSystem);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugNetwork] = SystemFlags::SystemFlagsType(SystemFlags::debugNetwork);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugPerformance] = SystemFlags::SystemFlagsType(SystemFlags::debugPerformance);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugWorldSynch] = SystemFlags::SystemFlagsType(SystemFlags::debugWorldSynch);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugUnitCommands] = SystemFlags::SystemFlagsType(SystemFlags::debugUnitCommands);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugLUA] = SystemFlags::SystemFlagsType(SystemFlags::debugLUA);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugSystem] = SystemFlags::SystemFlagsType(SystemFlags::debugSystem);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugNetwork] = SystemFlags::SystemFlagsType(SystemFlags::debugNetwork);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugPerformance] = SystemFlags::SystemFlagsType(SystemFlags::debugPerformance);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugWorldSynch] = SystemFlags::SystemFlagsType(SystemFlags::debugWorldSynch);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugUnitCommands] = SystemFlags::SystemFlagsType(SystemFlags::debugUnitCommands);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugLUA] = SystemFlags::SystemFlagsType(SystemFlags::debugLUA);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugError] = SystemFlags::SystemFlagsType(SystemFlags::debugError);
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
@@ -360,9 +361,12 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
|
||||
MutexSafeWrapper safeMutex(currentDebugLog.mutex);
|
||||
|
||||
if (type != debugPathFinder) {
|
||||
if (type != debugPathFinder && type != debugError) {
|
||||
(*currentDebugLog.fileStream) << "[" << szBuf2 << "] " << szBuf;
|
||||
}
|
||||
else if (type == debugError) {
|
||||
(*currentDebugLog.fileStream) << "[" << szBuf2 << "] *ERROR* " << szBuf;
|
||||
}
|
||||
else {
|
||||
(*currentDebugLog.fileStream) << szBuf;
|
||||
}
|
||||
@@ -372,9 +376,12 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
}
|
||||
// output to console
|
||||
else {
|
||||
if (type != debugPathFinder) {
|
||||
if (type != debugPathFinder && type != debugError) {
|
||||
printf("[%s] %s", szBuf2, szBuf);
|
||||
}
|
||||
else if (type == debugError) {
|
||||
printf("[%s] *ERROR* %s", szBuf2, szBuf);
|
||||
}
|
||||
else {
|
||||
printf("%s", szBuf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user