// re-translate server's output to idea.log
final String text = event.getText();
if (!StringUtil.isEmpty(text)) {
- LOG.info("COMPILE_SERVER [" +outputType.toString() +"]: "+ text);
+ LOG.info("COMPILE_SERVER [" +outputType.toString() +"]: "+ text.trim());
}
}
});
processHandler.addProcessListener(new ProcessAdapter() {
public void onTextAvailable(ProcessEvent event, Key outputType) {
final String text = event.getText();
- if (text != null && text.length() > 0) {
- System.out.print("JAVAC_SERVER [" + outputType.toString() + "]: " + text);
+ if (!StringUtil.isEmpty(text)) {
+ if (outputType == ProcessOutputTypes.STDOUT) {
+ System.out.print("JAVAC_SERVER: " + text);
+ }
+ else if (outputType == ProcessOutputTypes.STDERR){
+ System.err.print("JAVAC_SERVER: " + text);
+ }
}
}
});