requirements fixes + Reports > Logs folder

dev-fastapi
Ivan Maslov 2 years ago
parent cac73eec00
commit 3fdc316703

@ -331,8 +331,8 @@ def Create(inModeStr="BASIC", inLoggerLevel = None):
lResult = __Create__() # Create settings lResult = __Create__() # Create settings
# Создать файл логирования # Создать файл логирования
# add filemode="w" to overwrite # add filemode="w" to overwrite
if not os.path.exists("Reports"): if not os.path.exists("Logs"):
os.makedirs("Reports") os.makedirs("Logs")
########################## ##########################
# Подготовка логгера Robot # Подготовка логгера Robot
######################### #########################
@ -342,7 +342,7 @@ def Create(inModeStr="BASIC", inLoggerLevel = None):
lL.setLevel(logging.INFO) lL.setLevel(logging.INFO)
# create the logging file handler # create the logging file handler
mRobotLoggerFH = logging.FileHandler( mRobotLoggerFH = logging.FileHandler(
CrossOS.PathStr("Reports\\" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log")) CrossOS.PathStr("Logs\\" + datetime.datetime.now().strftime("%Y_%m_%d") + ".log"))
mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') mRobotLoggerFormatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
mRobotLoggerFH.setFormatter(mRobotLoggerFormatter) mRobotLoggerFH.setFormatter(mRobotLoggerFormatter)
# add handler to logger object # add handler to logger object
@ -361,5 +361,5 @@ def Create(inModeStr="BASIC", inLoggerLevel = None):
#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter) #mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)
#mRobotLogger.addHandler(mHandlerDumpLogList) #mRobotLogger.addHandler(mHandlerDumpLogList)
else: else:
if lL: lL.warning("Pay attention! Your code has been call SettingsTemplate.Create - since pyOpenRPA v1.2.7 GSettings is creating automatically") if lL: lL.warning("Внимание! Вручную была вызвана функция SettingsTemplate.Create - начиная с версии pyOpenRPA v1.2.7 глобальный словарь настроек создается автоматически!")
return lResult # return the result dict return lResult # return the result dict

@ -66,7 +66,8 @@ setup(name='pyOpenRPA',
'schedule>=1.1.0', 'schedule>=1.1.0',
'Jinja2>=2.2.11.2', 'Jinja2>=2.2.11.2',
'selenium>=3.141.0', 'selenium>=3.141.0',
'fastapi>=0.81.0' 'fastapi>=0.81.0',
'uvicorn>=0.18.3'
], ],
extras_require={ extras_require={
':sys_platform == "win32"': [ ':sys_platform == "win32"': [

Loading…
Cancel
Save