@ -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 ( " Report s" ) :
if not os . path . exists ( " Log s" ) :
os . makedirs ( " Report s" )
os . makedirs ( " Log s" )
##########################
##########################
# Подготовка логгера 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 ( " Report s\\ " + datetime . datetime . now ( ) . strftime ( " % Y_ % m_ %d " ) + " .log " ) )
CrossOS . PathStr ( " Log s\\ " + 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