示例#1
0
def createSysLog():
    '''
	创建系统日志
	:return:
	'''
    from SRC.settings import REPORT
    from SRC.common.loga import createLog
    from SRC.common.utils import createDir
    logger = None
    if REPORT['isWriteSysLog']:
        logDir = createDir(REPORT['logDir'], True)  # 创建日志目录
        logPath = os.path.join(logDir, sysLogFileName)  # 日志绝对路径
        logger = createLog(logPath)  # 日志对象
    return logger
示例#2
0
 def createScreenShotDir(self):
     screenShotDir = None
     if settings.REPORT['isScreenShot']:
         screenShotDir = createDir(
             settings.REPORT['screenShotDir'])  # 创建截图目录
     return screenShotDir
示例#3
0
 def createScreenShotDir(self):
     if EasyConfig().isScreenShot:
         screenShotDir = createDir(EasyConfig().screenShotDir)  # 创建截图目录
         self.screenShotDir = screenShotDir
示例#4
0
 def createLoggerObj(self):
     if EasyConfig().isWriteLog:
         # 创建日志对象
         logDir = createDir(EasyConfig().logDir)  # 创建日志目录
         logPath = os.path.join(logDir, getLogName())  # 日志绝对路径
         self.logger = createLog(logPath)  # 日志对象