Commit 95e25fcc authored by Andrey Filippov's avatar Andrey Filippov

Added logging

parent 571ef32e
...@@ -5762,16 +5762,20 @@ LogTee.install(); // once, early ...@@ -5762,16 +5762,20 @@ LogTee.install(); // once, early
LogTee.setSceneLog(path); // when you want to start per‑scene logging LogTee.setSceneLog(path); // when you want to start per‑scene logging
LogTee.clearSceneLog(); // stop per‑scene logging LogTee.clearSceneLog(); // stop per‑scene logging
*/ */
public void startLogging() { public static void startLogging(Path log_path) {
String x3d_path = getX3dTopDirectory();
Path log_path = Paths.get(x3d_path).resolve(getImageName()+SYSTEM_OUT_LOG_SUFFIX);
try { try {
LogTee.setSceneLog(log_path); LogTee.setSceneLog(log_path);
} catch (IOException e) { } catch (IOException e) {
System.err.println("startLogging(): failed to start logging to "+x3d_path); System.err.println("startLogging(): failed to start logging to "+log_path.toString());
} // when you want to start per‑scene logging } // when you want to start per‑scene logging
System.out.println("\n***** STARTING LOGGING: "+ System.out.println("\n***** STARTING LOGGING: "+
(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(Calendar.getInstance().getTime())+" *****\n")); (new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(Calendar.getInstance().getTime())+" *****\n"));
}
public void startLogging() {
String x3d_path = getX3dTopDirectory();
Path log_path = Paths.get(x3d_path).resolve(getImageName()+SYSTEM_OUT_LOG_SUFFIX);
startLogging(log_path);
} }
public void stopLogging() { public void stopLogging() {
......
...@@ -9232,6 +9232,10 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -9232,6 +9232,10 @@ if (debugLevel > -100) return true; // temporarily !
if (model_paths.length > 0) { if (model_paths.length > 0) {
for (int i = 0; i < model_paths.length; i++) { for (int i = 0; i < model_paths.length; i++) {
System.out.println("Processing model directory: "+model_paths[i]); System.out.println("Processing model directory: "+model_paths[i]);
Path log_path = Paths.get(model_paths[i]).resolve("RT"+QuadCLTCPU.SYSTEM_OUT_LOG_SUFFIX);
if (LogTee.getSceneLog()==null) {
QuadCLTCPU.startLogging(log_path);
}
// check if *-CUAS // check if *-CUAS
CuasDetectRT cuasDetectRT = new CuasDetectRT( CuasDetectRT cuasDetectRT = new CuasDetectRT(
clt_parameters, // CLTParameters clt_parameters, clt_parameters, // CLTParameters clt_parameters,
...@@ -9249,6 +9253,7 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -9249,6 +9253,7 @@ if (debugLevel > -100) return true; // temporarily !
} }
} }
System.out.println("nseq="+nseq); System.out.println("nseq="+nseq);
LogTee.clearSceneLog(); // stop per‑scene logging
} }
} }
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment