From 6a77b73cd86638446c81b43b40bd374014da17fc Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 10 Jul 2010 15:17:13 +0200 Subject: [PATCH] Changed: #991 Make sure all debug files are created in log directory --- code/nel/tools/3d/crash_log_analyser/main.cpp | 2 +- code/nel/tools/3d/file_info/main.cpp | 2 +- code/nel/tools/pacs/build_ig_boxes/main.cpp | 3 +-- code/nel/tools/pacs/build_rbank/main.cpp | 4 ++-- .../ryzom/server/src/entities_game_service/harvest_source.cpp | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/code/nel/tools/3d/crash_log_analyser/main.cpp b/code/nel/tools/3d/crash_log_analyser/main.cpp index df4c4e766..592f09e19 100644 --- a/code/nel/tools/3d/crash_log_analyser/main.cpp +++ b/code/nel/tools/3d/crash_log_analyser/main.cpp @@ -194,7 +194,7 @@ void statRyzomBug(const char *dirSrc) CPath::getPathContent(dirSrc, false, false, true, fileList, NULL, true); // delete the log.log - CFile::deleteFile("log.log"); + CFile::deleteFile(getLogDirectory() + "log.log"); TStatStrMap senderMap; TStatMap shardMap; diff --git a/code/nel/tools/3d/file_info/main.cpp b/code/nel/tools/3d/file_info/main.cpp index ef8318f3b..1e243a545 100644 --- a/code/nel/tools/3d/file_info/main.cpp +++ b/code/nel/tools/3d/file_info/main.cpp @@ -661,7 +661,7 @@ int main(int argc, const char *argv[]) // Open log FILE *logStream; - logStream= fopen("C:/temp/file_info.log", "wt"); + logStream= fopen(std::string(getLogDirectory() + "file_info.log").c_str(), "wt"); // parse dir or file ?? diff --git a/code/nel/tools/pacs/build_ig_boxes/main.cpp b/code/nel/tools/pacs/build_ig_boxes/main.cpp index d840882c7..de308ed25 100644 --- a/code/nel/tools/pacs/build_ig_boxes/main.cpp +++ b/code/nel/tools/pacs/build_ig_boxes/main.cpp @@ -120,8 +120,6 @@ void init() } // -CFileDisplayer fd("evallog.log", true); - int main(int argc, char **argv) { // Filter addSearchPath @@ -129,6 +127,7 @@ int main(int argc, char **argv) InfoLog->addNegativeFilter("adding the path"); createDebug(); + CFileDisplayer fd(getLogDirectory() + "evallog.log", true); try { diff --git a/code/nel/tools/pacs/build_rbank/main.cpp b/code/nel/tools/pacs/build_rbank/main.cpp index 82e6a5724..3f4657d18 100644 --- a/code/nel/tools/pacs/build_rbank/main.cpp +++ b/code/nel/tools/pacs/build_rbank/main.cpp @@ -299,14 +299,14 @@ void moulineZones(vector &zoneNames) /****************************************************************\ MAIN \****************************************************************/ -CFileDisplayer fd("evallog.log", true); - int main(int argc, char **argv) { // Filter addSearchPath NLMISC::createDebug(); InfoLog->addNegativeFilter ("adding the path"); + CFileDisplayer fd(getLogDirectory() + "evallog.log", true); + #ifdef LOG_ALL_INFO_TO_FILE createDebug(); DebugLog->addDisplayer (&fd); diff --git a/code/ryzom/server/src/entities_game_service/harvest_source.cpp b/code/ryzom/server/src/entities_game_service/harvest_source.cpp index 222b0ca49..fea6f6e37 100644 --- a/code/ryzom/server/src/entities_game_service/harvest_source.cpp +++ b/code/ryzom/server/src/entities_game_service/harvest_source.cpp @@ -1233,8 +1233,8 @@ bool forageTestDoExtract( } // Request and output results - FILE *f = fopen( "forage_test.csv", "at" ); - FILE *f2 = fopen( "forage_test.log", "at" ); + FILE *f = fopen( std::string(getLogDirectory() + "forage_test.csv").c_str(), "at" ); + FILE *f2 = fopen( std::string(getLogDirectory() + "forage_test.log").c_str(), "at" ); float reqS = 1.0f / (reqPeriod * 10.0f); float req [CHarvestSource::NbPosRTProps]; float abs [CHarvestSource::NbPosRTProps];