moved exception and logger classes to org.tianocore.common package; and created defin...
authoryshi8 <yshi8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Aug 2006 05:48:17 +0000 (05:48 +0000)
committeryshi8 <yshi8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 15 Aug 2006 05:48:17 +0000 (05:48 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1267 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java [new file with mode: 0644]
Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java [new file with mode: 0644]
Tools/Source/Common/org/tianocore/common/exception/EdkException.java [new file with mode: 0644]
Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java [new file with mode: 0644]
Tools/Source/Common/org/tianocore/common/logger/EdkLog.java [new file with mode: 0644]
Tools/Source/Common/org/tianocore/common/logger/LogMethod.java [new file with mode: 0644]
Tools/Source/Common/org/tianocore/exception/EdkException.java [deleted file]
Tools/Source/Common/org/tianocore/logger/DefaultLogger.java [deleted file]
Tools/Source/Common/org/tianocore/logger/EdkLog.java [deleted file]
Tools/Source/Common/org/tianocore/logger/LogMethod.java [deleted file]

diff --git a/Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java b/Tools/Source/Common/org/tianocore/common/definitions/EdkDefinitions.java
new file mode 100644 (file)
index 0000000..c455581
--- /dev/null
@@ -0,0 +1,111 @@
+/** @file\r
+  EdkDefinitions Class.\r
+\r
+  EdkDefinitions class incldes the common EDK definitions which are used\r
+  by the Tools.\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+package org.tianocore.definitions;\r
+\r
+/**\r
+  This class includes the common EDK definitions.\r
+ **/\r
+public class EdkDefinitions {\r
+    ///\r
+    /// MODULE_TYPE definitions\r
+    ///\r
+    public final static String MODULE_TYPE_BASE                 = "BASE";\r
+    public final static String MODULE_TYPE_SEC                  = "SEC";\r
+    public final static String MODULE_TYPE_PEI_CORE             = "PEI_CORE";\r
+    public final static String MODULE_TYPE_PEIM                 = "PEIM";\r
+    public final static String MODULE_TYPE_DXE_CORE             = "DXE_CORE";\r
+    public final static String MODULE_TYPE_DXE_DRIVER           = "DXE_DRIVER";\r
+    public final static String MODULE_TYPE_DXE_RUNTIME_DRIVER   = "DXE_RUNTIME_DRIVER";\r
+    public final static String MODULE_TYPE_DXE_SMM_DRIVER       = "DXE_SMM_DRIVER";\r
+    public final static String MODULE_TYPE_DXE_SAL_DRIVER       = "DXE_SAL_DRIVER";\r
+    public final static String MODULE_TYPE_UEFI_DRIVER          = "UEFI_DRIVER";\r
+    public final static String MODULE_TYPE_UEFI_APPLICATION     = "UEFI_APPLICATION";\r
+    public final static String MODULE_TYPE_USER_DEFINED         = "USER_DEFINED";\r
+    public final static String MODULE_TYPE_TOOL                 = "TOOL";\r
+\r
+    ///\r
+    /// Extension definitions for each of module types\r
+    ///\r
+    public final static String ModuleTypeExtensions[][] = {\r
+        { MODULE_TYPE_BASE,                 ".FFS" },\r
+        { MODULE_TYPE_SEC,                  ".SEC" },\r
+        { MODULE_TYPE_PEI_CORE,             ".PEI" },\r
+        { MODULE_TYPE_PEIM,                 ".PEI" },\r
+        { MODULE_TYPE_DXE_CORE,             ".DXE" },\r
+        { MODULE_TYPE_DXE_DRIVER,           ".DXE" },\r
+        { MODULE_TYPE_DXE_RUNTIME_DRIVER,   ".DXE" },\r
+        { MODULE_TYPE_DXE_SMM_DRIVER,       ".DXE" },\r
+        { MODULE_TYPE_DXE_SAL_DRIVER,       ".DXE" },\r
+        { MODULE_TYPE_UEFI_DRIVER,          ".DXE" },\r
+        { MODULE_TYPE_UEFI_APPLICATION,     ".APP" },\r
+        { MODULE_TYPE_USER_DEFINED,         ".FFS" },\r
+        { MODULE_TYPE_TOOL,                 ".FFS" }\r
+    };\r
+\r
+    ///\r
+    /// FFS_TYPE definitions\r
+    ///\r
+    public final static int EFI_FV_FILETYPE_ALL                     = 0x00;\r
+    public final static int EFI_FV_FILETYPE_RAW                     = 0x01;\r
+    public final static int EFI_FV_FILETYPE_FREEFORM                = 0x02;\r
+    public final static int EFI_FV_FILETYPE_SECURITY_CORE           = 0x03;\r
+    public final static int EFI_FV_FILETYPE_PEI_CORE                = 0x04;\r
+    public final static int EFI_FV_FILETYPE_DXE_CORE                = 0x05;\r
+    public final static int EFI_FV_FILETYPE_PEIM                    = 0x06;\r
+    public final static int EFI_FV_FILETYPE_DRIVER                  = 0x07;\r
+    public final static int EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER    = 0x08;\r
+    public final static int EFI_FV_FILETYPE_APPLICATION             = 0x09;\r
+    public final static int EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE   = 0x0B;\r
+    public final static int EFI_FV_FILETYPE_FFS_PAD                 = 0xF0;\r
+\r
+    ///\r
+    /// SECTION_TYPE definitions\r
+    ///\r
+    public final static String EFI_SECTION_COMPRESSION              = "EFI_SECTION_COMPRESSION";\r
+    public final static String EFI_SECTION_GUID_DEFINED             = "EFI_SECTION_GUID_DEFINED";\r
+    public final static String EFI_SECTION_PE32                     = "EFI_SECTION_PE32";\r
+    public final static String EFI_SECTION_PIC                      = "EFI_SECTION_PIC";\r
+    public final static String EFI_SECTION_TE                       = "EFI_SECTION_TE";\r
+    public final static String EFI_SECTION_DXE_DEPEX                = "EFI_SECTION_DXE_DEPEX";\r
+    public final static String EFI_SECTION_VERSION                  = "EFI_SECTION_VERSION";\r
+    public final static String EFI_SECTION_USER_INTERFACE           = "EFI_SECTION_USER_INTERFACE";\r
+    public final static String EFI_SECTION_COMPATIBILITY16          = "EFI_SECTION_COMPATIBILITY16";\r
+    public final static String EFI_SECTION_FIRMWARE_VOLUME_IMAGE    = "EFI_SECTION_FIRMWARE_VOLUME_IMAGE";\r
+    public final static String EFI_SECTION_FREEFORM_SUBTYPE_GUID    = "EFI_SECTION_FREEFORM_SUBTYPE_GUID";\r
+    public final static String EFI_SECTION_RAW                      = "EFI_SECTION_RAW";\r
+    public final static String EFI_SECTION_PEI_DEPEX                = "EFI_SECTION_PEI_DEPEX";\r
+\r
+    ///\r
+    /// Extension definitions for each of section types\r
+    ///\r
+    public final static String SectionTypeExtensions[][] = {\r
+        { EFI_SECTION_COMPRESSION,              ".sec"  },\r
+        { EFI_SECTION_GUID_DEFINED,             ".sec"  },\r
+        { EFI_SECTION_PE32,                     ".pe32" },\r
+        { EFI_SECTION_PIC,                      ".pic"  },\r
+        { EFI_SECTION_TE,                       ".tes"  },\r
+        { EFI_SECTION_DXE_DEPEX,                ".dpx"  },\r
+        { EFI_SECTION_VERSION,                  ".ver"  },\r
+        { EFI_SECTION_USER_INTERFACE,           ".ui"   },\r
+        { EFI_SECTION_COMPATIBILITY16,          ".sec"  },\r
+        { EFI_SECTION_FIRMWARE_VOLUME_IMAGE,    ".sec"  },\r
+        { EFI_SECTION_FREEFORM_SUBTYPE_GUID,    ".sec"  },\r
+        { EFI_SECTION_RAW,                      ".sec"  },\r
+        { EFI_SECTION_PEI_DEPEX,                ".dpx"  }\r
+    };\r
+}\r
diff --git a/Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java b/Tools/Source/Common/org/tianocore/common/definitions/ToolDefinitions.java
new file mode 100644 (file)
index 0000000..cc95e1f
--- /dev/null
@@ -0,0 +1,100 @@
+/** @file\r
+  ToolDefinitions Class.\r
+\r
+  ToolDefinitions class incldes the common Tool definitions.\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+package org.tianocore.definitions;\r
+\r
+import java.io.File;\r
+\r
+/**\r
+  This class includes the common Tool definitions.\r
+ **/\r
+public class ToolDefinitions {\r
+    ///\r
+    /// Line separator (carriage return-line feed, CRLF)\r
+    ///\r
+    public final static String LINE_SEPARATOR = "\r\n";\r
+\r
+    ///\r
+    /// Framework Database (FrameworkDatabase.db) file path\r
+    ///\r
+    public final static String FRAMEWORK_DATABASE_FILE_PATH =\r
+        "Tools" + File.separatorChar + "Conf" + File.separatorChar + "FrameworkDatabase.db";\r
+\r
+    ///\r
+    /// Target (target.txt) file path\r
+    ///\r
+    public final static String TARGET_FILE_PATH =\r
+        "Tools" + File.separatorChar + "Conf" + File.separatorChar + "target.txt";\r
+\r
+    ///\r
+    /// Default Tools Definition (tools_def.txt) file path\r
+    ///\r
+    public final static String DEFAULT_TOOLS_DEF_FILE_PATH =\r
+        "Tools" + File.separatorChar + "Conf" + File.separatorChar + "tools_def.txt";\r
+\r
+    ///\r
+    /// Extension names for SPD, FPD, and MSA\r
+    ///\r
+    public final static String SPD_EXTENSION    = ".spd";\r
+    public final static String FPD_EXTENSION    = ".fpd";\r
+    public final static String MSA_EXTENSION    = ".msa";\r
+\r
+    ///\r
+    /// Tool Chain Elements in the Tools Definition file\r
+    ///\r
+    public final static String TOOLS_DEF_ELEMENT_TARGET       = "TARGET";\r
+    public final static String TOOLS_DEF_ELEMENT_TOOLCHAIN    = "TOOLCHAIN";\r
+    public final static String TOOLS_DEF_ELEMENT_ARCH         = "ARCH";\r
+    public final static String TOOLS_DEF_ELEMENT_TOOLCODE     = "TOOLCODE";\r
+    public final static String TOOLS_DEF_ELEMENT_ATTRIBUTE    = "ATTRIBUTE";\r
+\r
+    ///\r
+    /// Index of Tool Chain elements in the Tools Definition file\r
+    ///\r
+    public final static int TOOLS_DEF_ELEMENT_INDEX_TARGET      = 0;\r
+    public final static int TOOLS_DEF_ELEMENT_INDEX_TOOLCHAIN   = 1;\r
+    public final static int TOOLS_DEF_ELEMENT_INDEX_ARCH        = 2;\r
+    public final static int TOOLS_DEF_ELEMENT_INDEX_TOOLCODE    = 3;\r
+    public final static int TOOLS_DEF_ELEMENT_INDEX_ATTRIBUTE   = 4;\r
+    public final static int TOOLS_DEF_ELEMENT_INDEX_MAXIMUM     = 5;\r
+\r
+    ///\r
+    /// Tool Chain Attributes in the Tools Definition file\r
+    ///\r
+    public final static String TOOLS_DEF_ATTRIBUTE_NAME       = "NAME";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_PATH       = "PATH";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_DPATH      = "DPATH";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_SPATH      = "SPATH";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_EXT        = "EXT";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_FAMILY     = "FAMILY";\r
+    public final static String TOOLS_DEF_ATTRIBUTE_FLAGS      = "FALGS";\r
+\r
+    ///\r
+    /// Tool Chain Families in the Tools Definition file\r
+    ///\r
+    public final static String TOOLS_DEF_FAMILY_MSFT          = "MSFT";\r
+    public final static String TOOLS_DEF_FAMILY_INTEL         = "INTEL";\r
+    public final static String TOOLS_DEF_FAMILY_GCC           = "GCC";\r
+\r
+    ///\r
+    /// Key name in the Target file\r
+    ///\r
+    public final static String TARGET_KEY_ACTIVE_PLATFORM     = "ACTIVE_PLATFORM";\r
+    public final static String TARGET_KEY_TARGET              = "TARGET";\r
+    public final static String TARGET_KEY_TOOLCHAIN           = "TOOL_CHAIN_TAG";\r
+    public final static String TARGET_KEY_ARCH                = "TARGET_ARCH";\r
+    public final static String TARGET_KEY_TOOLS_DEF           = "TOOL_CHAIN_CONF";\r
+}\r
diff --git a/Tools/Source/Common/org/tianocore/common/exception/EdkException.java b/Tools/Source/Common/org/tianocore/common/exception/EdkException.java
new file mode 100644 (file)
index 0000000..bd143d8
--- /dev/null
@@ -0,0 +1,48 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+  EdkException.java\r
+\r
+Abstract:\r
+\r
+--*/\r
+package org.tianocore.exception;\r
+\r
+public class EdkException extends Exception {\r
+    static final long serialVersionUID = -8494188017252114029L;\r
+    private StackTraceElement[] stackTrace;\r
+    public static boolean isPrintStack = false;\r
+\r
+    public EdkException(String message) {\r
+        super("[EdkException]:" + message);\r
+    }\r
+\r
+    public EdkException(String message, boolean traceStack) {\r
+        super(message);\r
+        \r
+    }\r
+    \r
+    public EdkException(){\r
+        super();\r
+    }\r
+    \r
+    public EdkException(Exception e, String message){\r
+        super("[EdkException]:" + message);\r
+        if (isPrintStack){\r
+            this.setStackTrace(e.getStackTrace());\r
+        }\r
+        e.printStackTrace();\r
+    }\r
+    public static void setIsprintStack (boolean flag){\r
+        isPrintStack = flag;\r
+    }\r
+}\r
diff --git a/Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java b/Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java
new file mode 100644 (file)
index 0000000..4bec8e5
--- /dev/null
@@ -0,0 +1,36 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+  DefaultLogger.java\r
+\r
+Abstract:\r
+\r
+--*/\r
+\r
+package org.tianocore.logger;\r
+import java.util.logging.Level;\r
+import java.util.logging.Logger;\r
+\r
+class DefaultLogger implements LogMethod {\r
+    private Logger logger = Logger.global;\r
+    private static Level[] levelMap = {\r
+        Level.SEVERE, Level.WARNING, Level.INFO, Level.FINE, Level.ALL\r
+    };\r
+\r
+    public DefaultLogger() {\r
+\r
+    }\r
+\r
+    public void putMessage(Object msgSource, int msgLevel, String msg) {\r
+        logger.log(levelMap[msgLevel], msg);\r
+    }\r
+}
\ No newline at end of file
diff --git a/Tools/Source/Common/org/tianocore/common/logger/EdkLog.java b/Tools/Source/Common/org/tianocore/common/logger/EdkLog.java
new file mode 100644 (file)
index 0000000..b16d39c
--- /dev/null
@@ -0,0 +1,91 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+  EdkLogger.java\r
+\r
+Abstract:\r
+\r
+--*/\r
+package org.tianocore.logger;\r
+\r
+import org.tianocore.logger.LogMethod;\r
+\r
+\r
+public class EdkLog {\r
+    private static final String error    = "ERROR";\r
+    private static final String warning  = "WARNING";\r
+    private static final String info     = "INFO";\r
+    private static final String verbose  = "VERBOSE";\r
+    private static final String debug    = "DEBUG";\r
+    \r
+    public static final int EDK_ERROR   = 0;\r
+    public static final int EDK_WARNING = 1;\r
+    public static final int EDK_INFO    = 2;\r
+    public static final int EDK_VERBOSE = 3;\r
+    public static final int EDK_DEBUG   = 4;\r
+\r
+    private static int logLevel = EDK_INFO;\r
+    private static LogMethod logger = new DefaultLogger();\r
+\r
+    public static void log(int level, String message) {\r
+        if (level <= logLevel){\r
+            logger.putMessage(null, logLevel, message);  \r
+        }\r
+       \r
+    }\r
+\r
+    public static void log(int logLevel, String message, Exception cause) {\r
+\r
+    }\r
+\r
+    public static void log(int logLevel, Exception cause) {\r
+\r
+    }\r
+\r
+    public static void log(Exception cause) {\r
+\r
+    }\r
+\r
+    public static void setLogger(LogMethod l) {\r
+        logger = l;\r
+    }\r
+    \r
+    public static void setLogLevel (int level){\r
+        logLevel = level;\r
+    }\r
+    public static void setLogLevel (String level){\r
+       if (level == null){\r
+           return;\r
+       }\r
+       String levelStr = level.trim();\r
+       if (levelStr.equalsIgnoreCase(error)){\r
+           logLevel = EDK_ERROR;\r
+       }\r
+       if (levelStr.equalsIgnoreCase(debug)){\r
+           logLevel = EDK_DEBUG;\r
+       } \r
+       if (levelStr.equalsIgnoreCase(info)){\r
+           logLevel = EDK_INFO;\r
+       } \r
+       if (levelStr.equalsIgnoreCase(verbose)){\r
+           logLevel = EDK_VERBOSE;\r
+       } \r
+       if (levelStr.equalsIgnoreCase(warning)){\r
+           logLevel = EDK_WARNING;\r
+       } \r
+    }\r
+    public static int getLogLevel (){\r
+        return logLevel;\r
+    }\r
+}\r
+\r
+\r
diff --git a/Tools/Source/Common/org/tianocore/common/logger/LogMethod.java b/Tools/Source/Common/org/tianocore/common/logger/LogMethod.java
new file mode 100644 (file)
index 0000000..ab60240
--- /dev/null
@@ -0,0 +1,23 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+Module Name:\r
+  LogMethod.java\r
+\r
+Abstract:\r
+\r
+--*/\r
+package org.tianocore.logger;\r
+\r
+\r
+public interface LogMethod {\r
+    public void putMessage(Object msgSource, int msgLevel, String msg);\r
+}\r
diff --git a/Tools/Source/Common/org/tianocore/exception/EdkException.java b/Tools/Source/Common/org/tianocore/exception/EdkException.java
deleted file mode 100644 (file)
index bd143d8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-  EdkException.java\r
-\r
-Abstract:\r
-\r
---*/\r
-package org.tianocore.exception;\r
-\r
-public class EdkException extends Exception {\r
-    static final long serialVersionUID = -8494188017252114029L;\r
-    private StackTraceElement[] stackTrace;\r
-    public static boolean isPrintStack = false;\r
-\r
-    public EdkException(String message) {\r
-        super("[EdkException]:" + message);\r
-    }\r
-\r
-    public EdkException(String message, boolean traceStack) {\r
-        super(message);\r
-        \r
-    }\r
-    \r
-    public EdkException(){\r
-        super();\r
-    }\r
-    \r
-    public EdkException(Exception e, String message){\r
-        super("[EdkException]:" + message);\r
-        if (isPrintStack){\r
-            this.setStackTrace(e.getStackTrace());\r
-        }\r
-        e.printStackTrace();\r
-    }\r
-    public static void setIsprintStack (boolean flag){\r
-        isPrintStack = flag;\r
-    }\r
-}\r
diff --git a/Tools/Source/Common/org/tianocore/logger/DefaultLogger.java b/Tools/Source/Common/org/tianocore/logger/DefaultLogger.java
deleted file mode 100644 (file)
index 4bec8e5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-  DefaultLogger.java\r
-\r
-Abstract:\r
-\r
---*/\r
-\r
-package org.tianocore.logger;\r
-import java.util.logging.Level;\r
-import java.util.logging.Logger;\r
-\r
-class DefaultLogger implements LogMethod {\r
-    private Logger logger = Logger.global;\r
-    private static Level[] levelMap = {\r
-        Level.SEVERE, Level.WARNING, Level.INFO, Level.FINE, Level.ALL\r
-    };\r
-\r
-    public DefaultLogger() {\r
-\r
-    }\r
-\r
-    public void putMessage(Object msgSource, int msgLevel, String msg) {\r
-        logger.log(levelMap[msgLevel], msg);\r
-    }\r
-}
\ No newline at end of file
diff --git a/Tools/Source/Common/org/tianocore/logger/EdkLog.java b/Tools/Source/Common/org/tianocore/logger/EdkLog.java
deleted file mode 100644 (file)
index b16d39c..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-  EdkLogger.java\r
-\r
-Abstract:\r
-\r
---*/\r
-package org.tianocore.logger;\r
-\r
-import org.tianocore.logger.LogMethod;\r
-\r
-\r
-public class EdkLog {\r
-    private static final String error    = "ERROR";\r
-    private static final String warning  = "WARNING";\r
-    private static final String info     = "INFO";\r
-    private static final String verbose  = "VERBOSE";\r
-    private static final String debug    = "DEBUG";\r
-    \r
-    public static final int EDK_ERROR   = 0;\r
-    public static final int EDK_WARNING = 1;\r
-    public static final int EDK_INFO    = 2;\r
-    public static final int EDK_VERBOSE = 3;\r
-    public static final int EDK_DEBUG   = 4;\r
-\r
-    private static int logLevel = EDK_INFO;\r
-    private static LogMethod logger = new DefaultLogger();\r
-\r
-    public static void log(int level, String message) {\r
-        if (level <= logLevel){\r
-            logger.putMessage(null, logLevel, message);  \r
-        }\r
-       \r
-    }\r
-\r
-    public static void log(int logLevel, String message, Exception cause) {\r
-\r
-    }\r
-\r
-    public static void log(int logLevel, Exception cause) {\r
-\r
-    }\r
-\r
-    public static void log(Exception cause) {\r
-\r
-    }\r
-\r
-    public static void setLogger(LogMethod l) {\r
-        logger = l;\r
-    }\r
-    \r
-    public static void setLogLevel (int level){\r
-        logLevel = level;\r
-    }\r
-    public static void setLogLevel (String level){\r
-       if (level == null){\r
-           return;\r
-       }\r
-       String levelStr = level.trim();\r
-       if (levelStr.equalsIgnoreCase(error)){\r
-           logLevel = EDK_ERROR;\r
-       }\r
-       if (levelStr.equalsIgnoreCase(debug)){\r
-           logLevel = EDK_DEBUG;\r
-       } \r
-       if (levelStr.equalsIgnoreCase(info)){\r
-           logLevel = EDK_INFO;\r
-       } \r
-       if (levelStr.equalsIgnoreCase(verbose)){\r
-           logLevel = EDK_VERBOSE;\r
-       } \r
-       if (levelStr.equalsIgnoreCase(warning)){\r
-           logLevel = EDK_WARNING;\r
-       } \r
-    }\r
-    public static int getLogLevel (){\r
-        return logLevel;\r
-    }\r
-}\r
-\r
-\r
diff --git a/Tools/Source/Common/org/tianocore/logger/LogMethod.java b/Tools/Source/Common/org/tianocore/logger/LogMethod.java
deleted file mode 100644 (file)
index ab60240..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-Module Name:\r
-  LogMethod.java\r
-\r
-Abstract:\r
-\r
---*/\r
-package org.tianocore.logger;\r
-\r
-\r
-public interface LogMethod {\r
-    public void putMessage(Object msgSource, int msgLevel, String msg);\r
-}\r