private static Map<FpdModuleIdentification, List<String>> map = new LinkedHashMap<FpdModuleIdentification, List<String> >(256);\r
\r
private FpdModuleIdentification id = null;\r
+ //\r
+ // semaroph for multi thread\r
+ // \r
+ public static Object semaphore = new Object();\r
\r
public GenBuildLogger () {\r
\r
}\r
\r
public void buildFinished(BuildEvent event) {\r
- Throwable error = event.getException();\r
- StringBuffer message = new StringBuffer();\r
-\r
- if (error == null) {\r
- message.append(StringUtils.LINE_SEP);\r
- message.append("BUILD SUCCESSFUL");\r
- } else {\r
- message.append(StringUtils.LINE_SEP);\r
- message.append("BUILD FAILED");\r
- message.append(StringUtils.LINE_SEP);\r
-\r
- if (Project.MSG_DEBUG <= msgOutputLevel\r
- || !(error instanceof BuildException)) {\r
- message.append(StringUtils.getStackTrace(error));\r
- } else {\r
- if (error instanceof BuildException) {\r
- message.append(error.toString()).append(lSep);\r
- } else {\r
- message.append(error.getMessage()).append(lSep);\r
- }\r
- }\r
- }\r
- message.append(StringUtils.LINE_SEP);\r
- message.append("Total time: ");\r
- message.append(formatTime(System.currentTimeMillis() - startTime));\r
-\r
- String msg = message.toString();\r
- if (error == null) {\r
- printMessage(msg, out, Project.MSG_VERBOSE);\r
- } else {\r
- printMessage(msg, err, Project.MSG_ERR);\r
- }\r
- log(msg);\r
+ if (this.msgOutputLevel >= Project.MSG_VERBOSE) {\r
+ int level = this.msgOutputLevel;\r
+ synchronized(semaphore){\r
+ this.msgOutputLevel = this.msgOutputLevel - 1;\r
+ super.buildFinished(event);\r
+ this.msgOutputLevel = level;\r
+ }\r
+ } else {\r
+ super.buildFinished(event);\r
+ }\r
}\r
}
\ No newline at end of file