From 65b7c3807834e336cf5fc6b956f4e7bba036f3b2 Mon Sep 17 00:00:00 2001 From: wszqkzqk Date: Sun, 30 Oct 2022 11:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9D=83=E9=99=90=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=9A=84=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pypvz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pypvz.py b/pypvz.py index dffe61c..228bf5d 100755 --- a/pypvz.py +++ b/pypvz.py @@ -18,7 +18,8 @@ if __name__ == "__main__": logger = logging.getLogger("main") formatter = logging.Formatter("%(asctime)s - %(levelname)s: %(message)s") fileHandler = RotatingFileHandler(c.USERLOG_PATH, "a", 1_000_000, 0, "utf-8") - os.chmod(c.USERLOG_PATH, 420) # 设置日志文件权限,Unix为644,Windows为可读、可写 + # 设置日志文件权限,Unix为644,Windows为可读写;Python的os.chmod与Unix chmod相同,但要显式说明8进制 + os.chmod(c.USERLOG_PATH, 0o644) fileHandler.setFormatter(formatter) streamHandler = logging.StreamHandler() streamHandler.setFormatter(formatter)