]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/Common/org/tianocore/common/logger/DefaultLogger.java
Add two definitions to ToolDefinitions. Enhance EdkLog and GenBuildLogger. GenBuildLo...
[mirror_edk2.git] / Tools / Source / Common / org / tianocore / common / logger / DefaultLogger.java
CommitLineData
652f4bd8 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
5are licensed and made available under the terms and conditions of the BSD License\r
6which accompanies this distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12Module Name:\r
13 DefaultLogger.java\r
14\r
15Abstract:\r
16\r
17--*/\r
18\r
ff225cbb 19package org.tianocore.common.logger;\r
20\r
c8df018e 21import java.io.File;\r
652f4bd8 22import java.util.logging.Level;\r
23import java.util.logging.Logger;\r
24\r
25class DefaultLogger implements LogMethod {\r
26 private Logger logger = Logger.global;\r
27 private static Level[] levelMap = {\r
28 Level.SEVERE, Level.WARNING, Level.INFO, Level.FINE, Level.ALL\r
29 };\r
30\r
31 public DefaultLogger() {\r
652f4bd8 32 }\r
33\r
34 public void putMessage(Object msgSource, int msgLevel, String msg) {\r
c8df018e 35 if (msgLevel < 0 || msgLevel > levelMap.length) {\r
36 msgLevel = 2;\r
37 }\r
652f4bd8 38 logger.log(levelMap[msgLevel], msg);\r
39 }\r
c8df018e 40 \r
41 public void flushToFile(File file){\r
42 \r
43 }\r
652f4bd8 44}