summaryrefslogtreecommitdiff
path: root/Tools/Java/Source
diff options
context:
space:
mode:
authorqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-16 06:14:02 +0000
committerqouyang <qouyang@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-16 06:14:02 +0000
commit5776c5c045abf935cbfd3e1e7b4c2ae0a2a419e2 (patch)
tree8be35053109e899414bf34865c736dbd68ca238e /Tools/Java/Source
parentd61237595f61d2292f72a590684f5b4b054c6409 (diff)
downloadedk2-platforms-5776c5c045abf935cbfd3e1e7b4c2ae0a2a419e2.tar.xz
Fixed EDKT372
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1751 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java47
1 files changed, 14 insertions, 33 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java b/Tools/Java/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java
index 2ab7a17e03..18ef849ed0 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java
@@ -59,6 +59,10 @@ public class GenBuildLogger extends DefaultLogger implements LogMethod {
private static Map<FpdModuleIdentification, List<String>> map = new LinkedHashMap<FpdModuleIdentification, List<String> >(256);
private FpdModuleIdentification id = null;
+ //
+ // semaroph for multi thread
+ //
+ public static Object semaphore = new Object();
public GenBuildLogger () {
@@ -270,38 +274,15 @@ public class GenBuildLogger extends DefaultLogger implements LogMethod {
}
public void buildFinished(BuildEvent event) {
- Throwable error = event.getException();
- StringBuffer message = new StringBuffer();
-
- if (error == null) {
- message.append(StringUtils.LINE_SEP);
- message.append("BUILD SUCCESSFUL");
- } else {
- message.append(StringUtils.LINE_SEP);
- message.append("BUILD FAILED");
- message.append(StringUtils.LINE_SEP);
-
- if (Project.MSG_DEBUG <= msgOutputLevel
- || !(error instanceof BuildException)) {
- message.append(StringUtils.getStackTrace(error));
- } else {
- if (error instanceof BuildException) {
- message.append(error.toString()).append(lSep);
- } else {
- message.append(error.getMessage()).append(lSep);
- }
- }
- }
- message.append(StringUtils.LINE_SEP);
- message.append("Total time: ");
- message.append(formatTime(System.currentTimeMillis() - startTime));
-
- String msg = message.toString();
- if (error == null) {
- printMessage(msg, out, Project.MSG_VERBOSE);
- } else {
- printMessage(msg, err, Project.MSG_ERR);
- }
- log(msg);
+ if (this.msgOutputLevel >= Project.MSG_VERBOSE) {
+ int level = this.msgOutputLevel;
+ synchronized(semaphore){
+ this.msgOutputLevel = this.msgOutputLevel - 1;
+ super.buildFinished(event);
+ this.msgOutputLevel = level;
+ }
+ } else {
+ super.buildFinished(event);
+ }
}
} \ No newline at end of file