Ejemplo n.º 1
0
def create_loggerconf():
    loggerconf_template = open(CreatorSettings.get_loggerconf_tempatepath(),
                               mode='r',
                               encoding="utf-8")
    loggerconf_content = loggerconf_template.read()
    loggerconf_content = loggerconf_content.replace('{log_folder}',
                                                    GlobalConfig.get_logdir())
    loggerconf_template.close()
    loogerconf_file = open(GlobalConfig.get_rootdir() +
                           GlobalConfig.get_slash() + "logger.conf",
                           mode='w',
                           encoding="utf-8")
    loogerconf_file.write(loggerconf_content)
    loogerconf_file.close()
Ejemplo n.º 2
0
 def create_log_dir(self):
     if not os.path.exists(GlobalConfig.get_logdir()):
         os.mkdir(GlobalConfig.get_logdir())