xtn-tools-pro 1.0.1.2.0__py3-none-any.whl → 1.0.1.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xtn_tools_pro/utils/log.py +7 -3
- {xtn_tools_pro-1.0.1.2.0.dist-info → xtn_tools_pro-1.0.1.2.1.dist-info}/METADATA +1 -1
- {xtn_tools_pro-1.0.1.2.0.dist-info → xtn_tools_pro-1.0.1.2.1.dist-info}/RECORD +7 -7
- {xtn_tools_pro-1.0.1.2.0.dist-info → xtn_tools_pro-1.0.1.2.1.dist-info}/LICENSE +0 -0
- {xtn_tools_pro-1.0.1.2.0.dist-info → xtn_tools_pro-1.0.1.2.1.dist-info}/WHEEL +0 -0
- {xtn_tools_pro-1.0.1.2.0.dist-info → xtn_tools_pro-1.0.1.2.1.dist-info}/entry_points.txt +0 -0
- {xtn_tools_pro-1.0.1.2.0.dist-info → xtn_tools_pro-1.0.1.2.1.dist-info}/top_level.txt +0 -0
xtn_tools_pro/utils/log.py
CHANGED
@@ -120,9 +120,13 @@ class Log:
|
|
120
120
|
# 记录日志文件的路径模板,用于之后创建新的日志文件
|
121
121
|
self.path_template = f"logs/{{date}}/{name}.log"
|
122
122
|
path = self.path_template.format(date=self.current_date)
|
123
|
+
# print(path)
|
123
124
|
if is_write_to_file:
|
124
|
-
|
125
|
-
|
125
|
+
mkdirs_dir_log_dirname = os.path.join(run_py_path, os.path.dirname(path))
|
126
|
+
self.mkdirs_dir_log_path = os.path.join(run_py_path, path)
|
127
|
+
# print(mkdirs_dir_log_dirname)
|
128
|
+
# print(mkdirs_dir_log_path)
|
129
|
+
mkdirs_dir(self.mkdirs_dir_log_path)
|
126
130
|
|
127
131
|
# 创建日志格式化器
|
128
132
|
# formatter = logging.Formatter('[%(now_datestr)s] [%(levelname)s] [%(func_name)s] - %(message)s') # 原
|
@@ -144,7 +148,7 @@ class Log:
|
|
144
148
|
# 判断是否要写入文件
|
145
149
|
if is_write_to_file:
|
146
150
|
# 创建文件处理器
|
147
|
-
file_handler = RotatingFileHandler(
|
151
|
+
file_handler = RotatingFileHandler(self.mkdirs_dir_log_path, mode=mode, max_bytes=max_bytes,
|
148
152
|
backup_count=backup_count, encoding=encoding)
|
149
153
|
# 设置文件处理器的格式化器
|
150
154
|
file_handler.setFormatter(formatter)
|
@@ -56,15 +56,15 @@ xtn_tools_pro/utils/__init__.py,sha256=I1_n_NP23F2lBqlF4EOlnOdLYxM8M4pbn63UhJN1h
|
|
56
56
|
xtn_tools_pro/utils/crypto.py,sha256=fyqno82Tw8LeF5i8YiEpjPI3oswsqTeWE5Lc9M2ef68,4603
|
57
57
|
xtn_tools_pro/utils/file_utils.py,sha256=obaBP7CaBCsXxzqGeWzV2l0yw7vicgKOaXzmpMV8ips,2567
|
58
58
|
xtn_tools_pro/utils/helpers.py,sha256=0CTMY7wfSQR_DC9-v1lkKQLpWcB1FL9V_kw_5DOcZ40,4454
|
59
|
-
xtn_tools_pro/utils/log.py,sha256=
|
59
|
+
xtn_tools_pro/utils/log.py,sha256=DTUWwi5pvZrwwq94odGnR0JBhfStrc6SxcJREqf2Ls4,11031
|
60
60
|
xtn_tools_pro/utils/retry.py,sha256=0wjHsR5DBBKpv4naMfxiky8kprrZes4WURIfFQ4H708,1657
|
61
61
|
xtn_tools_pro/utils/set_data.py,sha256=BzCLbEDO83csDHBey8kP7SoE6kx6EjqE7OqRBY7k82s,17608
|
62
62
|
xtn_tools_pro/utils/shell.py,sha256=s6sJedxLLQokcI1hF5YSD3qgGUPK0brNcP-D3-yv54I,3790
|
63
63
|
xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
|
64
64
|
xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
|
65
|
-
xtn_tools_pro-1.0.1.2.
|
66
|
-
xtn_tools_pro-1.0.1.2.
|
67
|
-
xtn_tools_pro-1.0.1.2.
|
68
|
-
xtn_tools_pro-1.0.1.2.
|
69
|
-
xtn_tools_pro-1.0.1.2.
|
70
|
-
xtn_tools_pro-1.0.1.2.
|
65
|
+
xtn_tools_pro-1.0.1.2.1.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
66
|
+
xtn_tools_pro-1.0.1.2.1.dist-info/METADATA,sha256=_BpF7-T-W_A4cqOI5FP9W1LOejUJLl2t68ATZ_18Vrc,545
|
67
|
+
xtn_tools_pro-1.0.1.2.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
68
|
+
xtn_tools_pro-1.0.1.2.1.dist-info/entry_points.txt,sha256=t8CtXWOgw7nRDW3XNlZh8MT_P4l8EzsFnyWi5b3ovrc,68
|
69
|
+
xtn_tools_pro-1.0.1.2.1.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
|
70
|
+
xtn_tools_pro-1.0.1.2.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|