当前位置: 首页>>代码示例>>Python>>正文


Python Logger.getRootLogger方法代码示例

本文整理汇总了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
开发者ID:pguermo,项目名称:qtaste,代码行数:12,代码来源:testscriptdoc_xmlformatter.py

示例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'
开发者ID:nfac,项目名称:experimental-qt,代码行数:33,代码来源:controlscript.py


注:本文中的org.apache.log4j.Logger.getRootLogger方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。