Skip to content

Commit 9b91d00

Browse files
committed
Forcing log write on termination.
1 parent 738f070 commit 9b91d00

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • Code/ChroniclerJ/src/edu/columbia/cs/psl/chroniclerj

Code/ChroniclerJ/src/edu/columbia/cs/psl/chroniclerj/Log.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,16 @@ public static void clearLog() {
2929
aLog_fill = 0;
3030

3131
}
32+
33+
private static boolean hasRegisteredHook = false;
34+
static {
35+
if(!hasRegisteredHook){
36+
hasRegisteredHook = true;
37+
Runtime.getRuntime().addShutdownHook(new Thread(){
38+
public void run(){
39+
ChroniclerJExportRunner.genTestCase();
40+
}
41+
});
42+
}
43+
}
3244
}

0 commit comments

Comments
 (0)