diff options
| author | Djshinshin <129614060+Djshinshin@users.noreply.github.com> | 2026-08-14 14:53:07 +0800 |
|---|---|---|
| committer | Djshinshin <129614060+Djshinshin@users.noreply.github.com> | 2026-08-14 14:53:07 +0800 |
| commit | bfb5c696856e9eb09c02574f8c4704cdeb60e389 (patch) | |
| tree | 1af16325f0902238c398ba1f17ec23c249f92073 /look2hear/utils/pylogger.py | |
| parent | 17de0fc5470cbd2671b8a19743ac3a6f8885e534 (diff) | |
| download | apollo-gfx803-bfb5c696856e9eb09c02574f8c4704cdeb60e389.tar.gz | |
Refine Traditional Chinese documentation scope
Diffstat (limited to 'look2hear/utils/pylogger.py')
| -rw-r--r-- | look2hear/utils/pylogger.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/look2hear/utils/pylogger.py b/look2hear/utils/pylogger.py index 805f66d..cf83129 100644 --- a/look2hear/utils/pylogger.py +++ b/look2hear/utils/pylogger.py @@ -12,14 +12,14 @@ class RankedLogger(logging.LoggerAdapter): name: str = __name__, rank_zero_only: bool = False, extra: Optional[Mapping[str, object]] = None, - log_file: str = "log.txt", # 新增記錄檔名稱參數 + log_file: str = "log.txt", # 添加日志文件名参数 ) -> None: logger = logging.getLogger(name) - # 設定記錄格式 + # 设置日志格式 formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') - # 新增檔案處理器 + # 添加文件处理器 file_handler = logging.FileHandler(log_file) file_handler.setFormatter(formatter) logger.addHandler(file_handler) |
