本文整理汇总了Python中comoonics.ComLog.errorTraceLog方法的典型用法代码示例。如果您正苦于以下问题:Python ComLog.errorTraceLog方法的具体用法?Python ComLog.errorTraceLog怎么用?Python ComLog.errorTraceLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comoonics.ComLog
的用法示例。
在下文中一共展示了ComLog.errorTraceLog方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getLVM_physicalVolume
# 需要导入模块: from comoonics import ComLog [as 别名]
# 或者: from comoonics.ComLog import errorTraceLog [as 别名]
def _getLVM_physicalVolume(self, device):
from comoonics.storage.ComLVM import LogicalVolume, LinuxVolumeManager, VolumeGroup
try:
(vgname, lvname)=LogicalVolume.splitLVPath(device)
_vg=VolumeGroup(vgname)
_pv=LinuxVolumeManager.pvlist(_vg)
ComLog.getLogger(__logStrLevel__).debug("detected physical volume %s" %_pv)
return _pv[0].getAttribute("name")
except LogicalVolume.LVMInvalidLVPathException, e:
ComLog.errorTraceLog()
return
示例2: __init__
# 需要导入模块: from comoonics import ComLog [as 别名]
# 或者: from comoonics.ComLog import errorTraceLog [as 别名]
def __init__(self, query):
from comoonics.cluster import getClusterRepository, getClusterInfo, clusterconf
ClusterAssistantHelper.__init__(self, query)
self.error=False
# create Reader object
try:
clusterRepository = getClusterRepository(clusterconf)
#create comclusterinfo object
self.clusterInfo = getClusterInfo(clusterRepository)
except Exception, e:
ComLog.getLogger(__logStrLevel__).error("Error parsing cluster.conf %s" %e)
ComLog.errorTraceLog()
self.error=True
示例3: scan
# 需要导入模块: from comoonics import ComLog [as 别名]
# 或者: from comoonics.ComLog import errorTraceLog [as 别名]
def scan(self):
try:
if self.query == "rootdisk":
_dev=self.getRootDevice()
ComLog.getLogger(__logStrLevel__).debug("detected rootdevice %s" %_dev)
return _dev
if self.query == "rootpartition":
return self.getRootPartition()
if self.query == "bootdisk":
return self.getBootDevice()
if self.query == "livecd":
return self.getLiveCDDevice()
except Exception, e:
ComLog.errorTraceLog()
return
示例4: handle
# 需要导入模块: from comoonics import ComLog [as 别名]
# 或者: from comoonics.ComLog import errorTraceLog [as 别名]
def handle(self):
logger.debug("Connected from %s %u" %(self.client_address))
# try:
exit=False
shellmode=False
logger.debug("Starting a shell")
from shell import Shell
myshell=Shell(self.rfile, self.wfile, self.server.user, self.server.passwd)
try:
myshell.cmdloop()
except:
ComLog.errorTraceLog(logger)
# except SSL.ZeroReturnError:
# pass
self.request.close()
logger.debug("Disconnected from %s %u" %(self.client_address))
示例5: __testLogger
# 需要导入模块: from comoonics import ComLog [as 别名]
# 或者: from comoonics.ComLog import errorTraceLog [as 别名]
def __testLogger(self, name, logger):
try:
from comoonics import ComLog
logger.debug("debug")
logger.info("info")
logger.warning("warning")
logger.error("error")
logger.critical("critical")
try:
raise IOError("testioerror")
except IOError:
# debugTraceLog(name)
# infoTraceLog(name)
# warningTraceLog(name)
ComLog.errorTraceLog(name)
# criticalTraceLog(name)
except:
self.assert_("Unexpected exception caught!")
示例6: __init__
# 需要导入模块: from comoonics import ComLog [as 别名]
# 或者: from comoonics.ComLog import errorTraceLog [as 别名]
def __init__(self, query):
from xml.dom.ext.reader import Sax2
from comoonics.cluster.ComClusterRepository import ClusterRepository
from comoonics.cluster.ComClusterInfo import ClusterInfo
ClusterAssistantHelper.__init__(self, query)
self.error=False
# create Reader object
try:
reader = Sax2.Reader()
_file = open("/etc/cluster/cluster.conf", "r")
reader = Sax2.Reader()
doc = reader.fromStream(_file)
#create comclusterRepository Object
clusterRepository = ClusterRepository(doc.documentElement, doc)
#create comclusterinfo object
self.clusterInfo = ClusterInfo(clusterRepository)
except Exception, e:
ComLog.getLogger(__logStrLevel__).error("Error parsing cluster.conf %s" %e)
ComLog.errorTraceLog()
self.error=True