## @file\r
# This file implements the log mechanism for Python tools.\r
#\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
# 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
WARN = 30\r
QUIET = 40\r
ERROR = 50\r
+SILENT = 99\r
\r
IsRaiseError = True\r
\r
_ToolName = os.path.basename(sys.argv[0])\r
\r
# For validation purpose\r
-_LogLevels = [DEBUG_0, DEBUG_1, DEBUG_2, DEBUG_3, DEBUG_4, DEBUG_5, DEBUG_6, DEBUG_7, DEBUG_8, DEBUG_9, VERBOSE, WARN, INFO, ERROR, QUIET]\r
+_LogLevels = [DEBUG_0, DEBUG_1, DEBUG_2, DEBUG_3, DEBUG_4, DEBUG_5,\r
+ DEBUG_6, DEBUG_7, DEBUG_8, DEBUG_9, VERBOSE, WARN, INFO,\r
+ ERROR, QUIET, SILENT]\r
\r
# For DEBUG level (All DEBUG_0~9 are applicable)\r
_DebugLogger = logging.getLogger("tool_debug")\r
_InfoLogger.setLevel(Level)\r
_ErrorLogger.setLevel(Level)\r
\r
+def InitializeForUnitTest():\r
+ Initialize()\r
+ SetLevel(SILENT)\r
+\r
## Get current log level\r
def GetLevel():\r
return _InfoLogger.getEffectiveLevel()\r