Remove FrameworkLogger in FrameworkTasks and EdkException in GenBuild. Update EdkLog to accept one more parameter. Remove all System.out in GenBuild.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1474 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
wuyizhong
2006-09-06 05:58:31 +00:00
parent 7ab9a5e580
commit 91f7d58229
26 changed files with 205 additions and 322 deletions

View File

@@ -63,12 +63,7 @@ public class CreateMtFileTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "createmtfile");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -109,20 +104,20 @@ public class CreateMtFileTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.outputFile)).getName());
revl = runner.execute();
if (EFI_SUCCESS == revl) {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "CreateMtFile succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("CreateMtFile failed!");
}
} catch (Exception e) {

View File

@@ -59,12 +59,7 @@ public class EfiCompressTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "eficompress");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -105,8 +100,8 @@ public class EfiCompressTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
revl = runner.execute();
@@ -114,12 +109,12 @@ public class EfiCompressTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "EfiCompress succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("EfiCompress failed!");
}

View File

@@ -112,12 +112,7 @@ public class EfiRomTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "efirom");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -163,8 +158,8 @@ public class EfiRomTask extends Task implements EfiDefine {
}
}
EdkLog.log(EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));
EdkLog.log(EdkLog.EDK_INFO, " ");
EdkLog.log(this, EdkLog.EDK_VERBOSE, argList.toString().replaceAll(",",""));
EdkLog.log(this, EdkLog.EDK_INFO, " ");
//
// lauch the program

View File

@@ -142,12 +142,6 @@ public class FlashMapTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "flashmap");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
@@ -198,13 +192,13 @@ public class FlashMapTask extends Task implements EfiDefine {
//
// log command line string.
//
EdkLog.log(EdkLog.EDK_VERBOSE, cmdProc.getOutputStream().toString());
EdkLog.log(EdkLog.EDK_INFO, (new File(this.flashDefFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, cmdProc.getOutputStream().toString());
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.flashDefFile)).getName());
if (exitCode != 0) {
int len = cmdOut.read(buf, 0, 1024);
EdkLog.log(EdkLog.EDK_INFO, new String(buf, 0, len));
EdkLog.log(this, EdkLog.EDK_INFO, new String(buf, 0, len));
} else {
EdkLog.log(EdkLog.EDK_VERBOSE, "FlashMap succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "FlashMap succeeded!");
}
} catch (Exception e) {
throw new BuildException(e.getMessage());

View File

@@ -1,40 +0,0 @@
/*++
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
FrameworkLogger.java
Abstract:
--*/
package org.tianocore.framework.tasks;
import org.apache.tools.ant.Project;
import java.io.File;
import org.tianocore.common.logger.LogMethod;
class FrameworkLogger implements LogMethod {
private Project project;
private String titleName;
public FrameworkLogger(Project project, String taskName) {
this.project = project;
this.titleName = taskName;
}
public void putMessage(Object msgSource, int msgLevel, String msg) {
String frameworkMsg = " [" + this.titleName + "] " + msg;
this.project.log(frameworkMsg, Project.MSG_INFO);
}
public void flushToFile(File file) {
}
}

View File

@@ -60,12 +60,6 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "genacpitable");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
@@ -105,20 +99,20 @@ public class GenAcpiTableTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
revl = runner.execute();
if (EFI_SUCCESS == revl) {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "GenAcpiTable succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "GenAcpiTable succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("GenAcpiTable failed!");
}
} catch (Exception e) {

View File

@@ -91,12 +91,6 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "gencapsulehdr");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
@@ -138,20 +132,20 @@ public class GenCapsuleHdrTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(scriptFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(scriptFile)).getName());
revl = runner.execute();
if (EFI_SUCCESS == revl) {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "GenCapsuleHdr succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "GenCapsuleHdr succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_ERROR, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_ERROR, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("GenCapsuleHdr failed!");
}
} catch (Exception e) {

View File

@@ -124,13 +124,6 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
String ffsSuffix = "";
String outputPath = "";
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "genFfs");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// Get Fraemwork_Tools_Path
@@ -751,7 +744,7 @@ public class GenFfsFileTask extends Task implements EfiDefine, FfsTypes {
FfsHeader ffsHeader = new FfsHeader();
FfsHeader orgFfsHeader = new FfsHeader();
EdkLog.log(EdkLog.EDK_INFO, ffsFile.getName());
EdkLog.log(this, EdkLog.EDK_INFO, ffsFile.getName());
try {
//

View File

@@ -79,12 +79,6 @@ public class GenTeImageTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, toolName.toLowerCase());
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
@@ -126,8 +120,8 @@ public class GenTeImageTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
revl = runner.execute();
@@ -135,12 +129,12 @@ public class GenTeImageTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "GenTeImage succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "GenTeImage succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
throw new BuildException("GenTeImage failed!");
}
} catch (Exception e) {

View File

@@ -16,15 +16,11 @@ package org.tianocore.framework.tasks;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.LineNumberReader;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
@@ -75,9 +71,6 @@ public class MakeDeps extends Task {
Project prj = this.getOwningTarget().getProject();
String toolPath = prj.getProperty("env.FRAMEWORK_TOOLS_PATH");
FrameworkLogger logger = new FrameworkLogger(prj, "makedeps");
EdkLog.setLogLevel(prj.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
///
/// compose full tool path
@@ -145,7 +138,7 @@ public class MakeDeps extends Task {
runner.setAntRun(prj);
runner.setCommandline(cmd.getCommandline());
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmd.getCommandline()));
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmd.getCommandline()));
int result = 0;
try {
@@ -155,7 +148,7 @@ public class MakeDeps extends Task {
}
if (result != 0) {
EdkLog.log(EdkLog.EDK_INFO, "MakeDeps failed!");
EdkLog.log(this, EdkLog.EDK_INFO, "MakeDeps failed!");
throw new BuildException("MakeDeps: failed to generate dependency file!");
}
}

View File

@@ -70,12 +70,6 @@ public class ModifyInfTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "modifyinftask");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
@@ -120,20 +114,20 @@ public class ModifyInfTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFVInfFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFVInfFile)).getName());
revl = runner.execute();
if (EFI_SUCCESS == revl) {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "ModifyInfTask succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "ModifyInfTask succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("ModifyInfTask failed!");
}
} catch (Exception e) {

View File

@@ -73,12 +73,6 @@ public class PeiReBaseTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, toolName.toLowerCase());
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
@@ -130,8 +124,8 @@ public class PeiReBaseTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, this.inputFileName);
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, this.inputFileName);
revl = runner.execute();
@@ -139,12 +133,12 @@ public class PeiReBaseTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "PeiReBase succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("PeiReBase failed!");
}
} catch (Exception e) {

View File

@@ -67,12 +67,6 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "secapresetvectorfixup");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
String path = project.getProperty("env.FRAMEWORK_TOOLS_PATH");
@@ -112,8 +106,8 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.fvInputFile)).getName());
revl = runner.execute();
@@ -121,12 +115,12 @@ public class SecApResetVectorFixupTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "SecApResetVectorFixup succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "SecApResetVectorFixup succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("SecApResetVectorFixup failed!");
}
} catch (Exception e) {

View File

@@ -69,13 +69,7 @@ public class SecFixupTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, toolName
.toLowerCase());
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -117,7 +111,7 @@ public class SecFixupTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
revl = runner.execute();
@@ -125,12 +119,12 @@ public class SecFixupTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "SecFixup succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "SecFixup succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = "+ Integer.toHexString(revl));
throw new BuildException("SecFixup failed!");
}
} catch (Exception e) {

View File

@@ -58,13 +58,6 @@ public class SplitfileTask extends Task implements EfiDefine {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "splitfile");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -99,19 +92,19 @@ public class SplitfileTask extends Task implements EfiDefine {
runner.setAntRun(project);
runner.setCommandline(cmdline.getCommandline());
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
revl = runner.execute();
if (EFI_SUCCESS == revl) {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "SplitFile succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "SplitFile succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("SplitFile failed!");
}
} catch (Exception e) {

View File

@@ -60,12 +60,7 @@ public class StripTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "strip");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -106,8 +101,8 @@ public class StripTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.inputFile)).getName());
revl = runner.execute();
@@ -115,12 +110,12 @@ public class StripTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "Strip succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "Strip succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("Strip failed!");
}
} catch (Exception e) {

View File

@@ -167,7 +167,6 @@ public class VfrCompilerTask extends Task implements EfiDefine {
} else {
command = toolPath + "/" + "VfrCompile";
}
List<Object> includePath = new ArrayList<Object>();
String incPath = "";
int count = includepathList.size();

View File

@@ -60,12 +60,7 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
public void execute() throws BuildException {
Project project = this.getOwningTarget().getProject();
//
// set Logger
//
FrameworkLogger logger = new FrameworkLogger(project, "zerodebugdata");
EdkLog.setLogLevel(project.getProperty("env.LOGLEVEL"));
EdkLog.setLogger(logger);
//
// absolute path of efi tools
//
@@ -106,8 +101,8 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
//
// Set debug log information.
//
EdkLog.log(EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(EdkLog.EDK_INFO, (new File(this.peFile)).getName());
EdkLog.log(this, EdkLog.EDK_VERBOSE, Commandline.toString(cmdline.getCommandline()));
EdkLog.log(this, EdkLog.EDK_INFO, (new File(this.peFile)).getName());
revl = runner.execute();
@@ -115,12 +110,12 @@ public class ZeroDebugDataTask extends Task implements EfiDefine {
//
// command execution success
//
EdkLog.log(EdkLog.EDK_VERBOSE, "ZeroDebugData succeeded!");
EdkLog.log(this, EdkLog.EDK_VERBOSE, "ZeroDebugData succeeded!");
} else {
//
// command execution fail
//
EdkLog.log(EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
EdkLog.log(this, EdkLog.EDK_INFO, "ERROR = " + Integer.toHexString(revl));
throw new BuildException("ZeroDebugData failed!");
}