本文整理汇总了Python中org.apache.log4j.Logger.getRootLogger方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.getRootLogger方法的具体用法?Python Logger.getRootLogger怎么用?Python Logger.getRootLogger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.log4j.Logger
的用法示例。
在下文中一共展示了Logger.getRootLogger方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getVersion
# 需要导入模块: from org.apache.log4j import Logger [as 别名]
# 或者: from org.apache.log4j.Logger import getRootLogger [as 别名]
def _getVersion(self, testScriptFileName):
from org.apache.log4j import Logger as _Logger, Level as _Level
# set log4j logger level to ERROR
rootLogger = _Logger.getRootLogger()
rootLevel = rootLogger.getLevel()
rootLogger.setLevel(_Level.ERROR)
from com.qspin.qtaste.util.versioncontrol import VersionControl
version = VersionControl.getInstance().getTestApiVersion(os.path.dirname(testScriptFileName))
rootLogger.setLevel(rootLevel)
return version
示例2: _exitWithError
# 需要导入模块: from org.apache.log4j import Logger [as 别名]
# 或者: from org.apache.log4j.Logger import getRootLogger [as 别名]
# - login: login name
# - waitingTime: default is 60 seconds. Sleeping time before continuing to the control script.
#
##
import os as _os, sys as _sys, re as _re, time as _time
import datetime as _datetime
import traceback
from org.apache.log4j import Logger as _Logger, Level as _Level
from com.qspin.qtaste.util import OS as _OS, Exec as _Exec
from com.qspin.qtaste.config import TestBedConfiguration as _TestBedConfiguration
from com.qspin.qtaste.tcom.rlogin import RLogin as _RLogin
# set log4j logger level to WARN
_Logger.getRootLogger().setLevel(_Level.WARN)
# conditional expression
_IF = lambda a,b,c:(a and [b] or [c])[0]
def _exitWithError(message):
""" Exits program with error code 1 after printing given message to standard error output """
print >> _sys.stderr, message
_sys.exit(1);
def _parseCommandLineArguments():
"""
Parse command-line arguments
@return tuple (start, arguments) where start is true if and only if first argument is 'start'