diff options
-rw-r--r-- | Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java | 15 | ||||
-rw-r--r-- | Tools/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java index 648526c823..b053bdd566 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java +++ b/Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java @@ -35,6 +35,7 @@ import org.apache.xmlbeans.XmlObject; import org.tianocore.common.definitions.ToolDefinitions;
import org.tianocore.common.exception.EdkException;
+import org.tianocore.common.logger.EdkLog;
import org.tianocore.build.autogen.AutoGen;
import org.tianocore.build.exception.AutoGenException;
import org.tianocore.build.exception.GenBuildException;
@@ -269,7 +270,7 @@ public class GenBuildTask extends Ant { // Whether the module is built before
//
if (moduleId.isLibrary() == false && GlobalData.hasFpdModuleSA(fpdModuleId) == false) {
- getProject().log(this, "Warning: " + moduleId + " for " + archList[k] + " was not found in current platform FPD file!\n", Project.MSG_WARN);
+ EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: " + moduleId + " for " + archList[k] + " was not found in current platform FPD file!\n");
continue;
} else if (GlobalData.isModuleBuilt(fpdModuleId)) {
break;
@@ -294,7 +295,7 @@ public class GenBuildTask extends Ant { // don't do anything if no tools found
//
if (GlobalData.isCommandSet(targetList[i], toolchainList[j], archList[k]) == false) {
- getProject().log(this, "Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n", Project.MSG_WARN);
+ EdkLog.log(this, EdkLog.EDK_WARNING, "Warning: No build issued. No tools were found for [target=" + targetList[i] + " toolchain=" + toolchainList[j] + " arch=" + archList[k] + "]\n");
continue;
}
@@ -304,8 +305,8 @@ public class GenBuildTask extends Ant { //
getProject().setProperty("TOOLCHAIN", toolchainList[j]);
- getProject().log(this, "Build " + moduleId + " start >>>", Project.MSG_INFO);
- getProject().log(this, "Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k], Project.MSG_INFO);
+ EdkLog.log(this, "Build " + moduleId + " start >>>");
+ EdkLog.log(this, "Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);
saq.push(GlobalData.getDoc(fpdModuleId));
//
@@ -614,7 +615,7 @@ public class GenBuildTask extends Ant { // then call the exist BaseName_build.xml directly.
//
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {
- getProject().log(this, "Call user-defined " + moduleId.getName() + "_build.xml", Project.MSG_INFO);
+ EdkLog.log(this, "Call user-defined " + moduleId.getName() + "_build.xml");
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml";
antCall(antFilename, null);
@@ -644,7 +645,7 @@ public class GenBuildTask extends Ant { // then call the exist BaseName_build.xml directly.
//
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {
- getProject().log(this, "Calling user-defined " + moduleId.getName() + "_build.xml", Project.MSG_INFO);
+ EdkLog.log(this, "Calling user-defined " + moduleId.getName() + "_build.xml");
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml";
antCall(antFilename, "clean");
@@ -662,7 +663,7 @@ public class GenBuildTask extends Ant { // then call the exist BaseName_build.xml directly.
//
if (moduleId.getModuleType().equalsIgnoreCase("USER_DEFINED")) {
- getProject().log(this, "Calling user-defined " + moduleId.getName() + "_build.xml", Project.MSG_INFO);
+ EdkLog.log(this, "Calling user-defined " + moduleId.getName() + "_build.xml");
String antFilename = getProject().getProperty("MODULE_DIR") + File.separatorChar + moduleId.getName() + "_build.xml";
antCall(antFilename, "cleanall");
diff --git a/Tools/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java b/Tools/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java index 7091314c69..c7bc01599b 100644 --- a/Tools/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java +++ b/Tools/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java @@ -161,7 +161,7 @@ public class GenBuildLogger extends DefaultLogger implements LogMethod { private void log(Object msgSource, String msg, int level) {
if (msgSource instanceof Task) {
- this.project.log((Task)msgSource, msg, level);
+ ((Task)msgSource).getProject().log((Task)msgSource, msg, level);
} else if (msgSource instanceof String){
//
// Pad 12 space to keep message in unify format
|