@ -331,8 +331,8 @@ def Create(inModeStr="BASIC", inLoggerLevel = None):
lResult = __Create__ ( ) # Create settings
# Создать файл логирования
# add filemode="w" to overwrite
if not os . path . exists ( " Report s" ) :
os . makedirs ( " Report s" )
if not os . path . exists ( " Log s" ) :
os . makedirs ( " Log s" )
##########################
# Подготовка логгера Robot
#########################
@ -342,7 +342,7 @@ def Create(inModeStr="BASIC", inLoggerLevel = None):
lL . setLevel ( logging . INFO )
# create the logging file handler
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 ' )
mRobotLoggerFH . setFormatter ( mRobotLoggerFormatter )
# add handler to logger object
@ -361,5 +361,5 @@ def Create(inModeStr="BASIC", inLoggerLevel = None):
#mHandlerDumpLogList.setFormatter(mRobotLoggerFormatter)
#mRobotLogger.addHandler(mHandlerDumpLogList)
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