forked from JavaTX/JavaCompilerCore
added support for non-threaded logging to WriterActiveObject
This commit is contained in:
parent
8f8ee9a385
commit
c14dd6e97c
@ -2592,11 +2592,19 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
|
||||
void writeLog(String str) {
|
||||
if (log && finalresult) {
|
||||
if(parallel){
|
||||
logFile.write("Thread no.:" + thNo + "\n"
|
||||
+ "noOfThread:" + noOfThread + "\n"
|
||||
+ "parallel:" + parallel + "\n"
|
||||
+ str+"\n\n"
|
||||
);
|
||||
}else{
|
||||
logFile.writeNonThreaded("Thread no.:" + thNo + "\n"
|
||||
+ "noOfThread:" + noOfThread + "\n"
|
||||
+ "parallel:" + parallel + "\n"
|
||||
+ str+"\n\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,17 @@ public class WriterActiveObject {
|
||||
writer.write(message);
|
||||
writer.flush();
|
||||
} catch (IOException e) {
|
||||
System.out.println(e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void writeNonThreaded(String message){
|
||||
try {
|
||||
writer.write(message);
|
||||
writer.flush();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user