log.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:malware 作者: JustF0rWork 项目源码 文件源码
def get_error_log_handle(flags=os.O_APPEND | os.O_CREAT | os.O_WRONLY):
    if not hasattr(_thread_data, "error_log_handle"):
        _ = os.path.join(config.LOG_DIR, "error.log")
        if not os.path.exists(_):
            open(_, "w+").close()
            os.chmod(_, DEFAULT_ERROR_LOG_PERMISSIONS)
        _thread_data.error_log_path = _
        _thread_data.error_log_handle = os.open(_thread_data.error_log_path, flags)
    return _thread_data.error_log_handle
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号