From 4f0ee5178f6bc75e70eda87434662bcef1923885 Mon Sep 17 00:00:00 2001 From: Ralf Gerlich <ralf.gerlich@custom-scenery.org> Date: Tue, 8 Jan 2008 12:02:24 +0100 Subject: [PATCH] Stow the logfile away if a tile failed in fgfs-tools-client. --- src/BuildTiles/Parallel/client.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/BuildTiles/Parallel/client.cxx b/src/BuildTiles/Parallel/client.cxx index 1636cde2..aa3265b3 100644 --- a/src/BuildTiles/Parallel/client.cxx +++ b/src/BuildTiles/Parallel/client.cxx @@ -296,13 +296,23 @@ bool construct_tile( const SGBucket& b, line_str = line_str.substr(0, line_str.length() - 1); // cout << line_str << endl; if ( line_str == "[Finished successfully]" ) { + cout << "Tile " << b.gen_index_str() << " finished successfully" << endl; fclose(fp); return true; } } fclose(fp); - + + // Save the log file of the failed tile + cout << "Tile " << b.gen_index_str() << " failed" << endl; + string savelog=work_base+"/Status/failed-"+b.gen_index_str()+".log"; + + command="mv "+result_file+" " +savelog; + cout << command << endl; + + system(command.c_str()); + return false; }