]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update log.
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 13 Sep 2006 07:40:49 +0000 (07:40 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 13 Sep 2006 07:40:49 +0000 (07:40 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1528 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/global/GenBuildLogger.java

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