Update log.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1528 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
wuyizhong 2006-09-13 07:40:49 +00:00
parent d8956f143e
commit d965d1f63f
2 changed files with 9 additions and 8 deletions

View File

@ -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");

View File

@ -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