def env2compile(cls, env): h = cls.env2dict(env) lines = ["{}={}".format(k, v) for k, v in h.items()] filepath = os.path.join(REPO_DIR, "henrique", "env", "docker", "env.{}.list".format(env)) FileTool.makedirs_or_skip(os.path.dirname(filepath)) FileTool.utf82file("\n".join(lines), filepath)
def attach_filepath2rootname_list( cls, rootname_list, filepath, level, ): from foxylib.tools.file.file_tool import FileTool FileTool.makedirs_or_skip(os.path.dirname(filepath)) handler = LoggerTool.handler_formatter2formatted( LoggerTool.filepath2handler_default(filepath), FoxylibLogFormatter.formatter(), ) handler.setLevel(level) cls.attach_handler2rootname_list( rootname_list, handler, )