代码拉取完成,页面将自动刷新
同步操作将从 openEuler/openeuler-os-build 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env python
# -*- coding=utf-8 -*-
# init log file,two ways for log,one is log file other one is console output
# Author: yhon
# Copyright Huawei Technologies Co., Ltd. 2010-2018. All rights reserved.
"""
log
"""
import logging
import os.path
import time
CUR_DIR = os.path.dirname(os.path.realpath(__file__))
def log_init():
"""
init log handle
"""
log = logging.getLogger()
log.setLevel(logging.INFO)
# set log file location,the file on the output dir
log_path = os.path.join(os.path.join(CUR_DIR, ".."), "output")
if not os.path.exists(log_path):
os.makedirs(log_path)
# set log format
formatter = logging.Formatter("%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s")
# if log file path exist, init log file handler
if os.path.exists(log_path):
rq = time.strftime('build', time.localtime(time.time()))
logfile = os.path.join(log_path, "{0}.log".format(rq))
# set file handler
fh = logging.FileHandler(logfile, mode='w')
fh.setLevel(logging.DEBUG)
fh.setFormatter(formatter)
log.addHandler(fh)
# set console output handler
ch = logging.StreamHandler()
ch.setLevel(logging.INFO)
ch.setFormatter(formatter)
log.addHandler(ch)
return log
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。