ParUtils 1.2.3__py3-none-any.whl → 1.2.4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {ParUtils-1.2.3.dist-info → ParUtils-1.2.4.dist-info}/METADATA +1 -1
- {ParUtils-1.2.3.dist-info → ParUtils-1.2.4.dist-info}/RECORD +8 -8
- parutils/changelog.py +9 -4
- parutils/logging/const.py +0 -3
- parutils/logging/logger.py +10 -10
- {ParUtils-1.2.3.dist-info → ParUtils-1.2.4.dist-info}/LICENSE +0 -0
- {ParUtils-1.2.3.dist-info → ParUtils-1.2.4.dist-info}/WHEEL +0 -0
- {ParUtils-1.2.3.dist-info → ParUtils-1.2.4.dist-info}/top_level.txt +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
parutils/__init__.py,sha256=EaFtUmU0kYgnjvAFwPmoKt7I5zn9bxY02R7TUtcE6M4,1434
|
2
|
-
parutils/changelog.py,sha256=
|
2
|
+
parutils/changelog.py,sha256=VKGB9PccjQjzrSdDQqZP6dNZYaHj_5hUGwbOfKmWyfs,1835
|
3
3
|
parutils/csvl.py,sha256=UBqw0lyhTNqFLSNIE-JM7TAQYCRgHftYQmHi21ru8-A,2874
|
4
4
|
parutils/dq.py,sha256=kdvzOo5FLCumXagY05kGSseYlbR-zvjjmsMtGVliVc8,2302
|
5
5
|
parutils/file.py,sha256=dedO84jZVXrE0x_31Wy_QhM6wTPOAshhp4SuT92rrPQ,2869
|
@@ -10,14 +10,14 @@ parutils/testing.py,sha256=kXrMz8Kze4mZejaePmV_OIca4iuNcG_dhGVHCgVuF-k,610
|
|
10
10
|
parutils/wrap.py,sha256=PqMyKodgEjWDXoIVZZXRaBSdkGFL5OWmVJttl2Crrg8,421
|
11
11
|
parutils/logging/__init__.py,sha256=rSNpgjuYer-Hhn6zKzKwKSn_KfcajEXlk6cJnPC9eJU,461
|
12
12
|
parutils/logging/cl.py,sha256=NCLuxLHvqRTypZlAgwnegkByLTnTirKntnwguJHBelA,2086
|
13
|
-
parutils/logging/const.py,sha256=
|
13
|
+
parutils/logging/const.py,sha256=9GrSonZu9YXz0U1dVHIiAaAjGcVQs_cnKc__6-C_CIc,41
|
14
14
|
parutils/logging/core.py,sha256=POLKsQaaKYZOR7IhWtAaF5a8noZL7hKdssmrOtle4S4,850
|
15
15
|
parutils/logging/g.py,sha256=ZSrgZw63kwxIW66A7-9_iYeDt4AstNZ_XXQgK8MglyQ,47
|
16
|
-
parutils/logging/logger.py,sha256=
|
16
|
+
parutils/logging/logger.py,sha256=4jBb7fjZBQKKNwat46BjTrcSV20uKX3-hcyBMTFk34M,5011
|
17
17
|
parutils/logging/main.py,sha256=arUvgB0YTZpidt4wl2GZsR4bRUj_rrSYMrTnCMKt4gA,2127
|
18
18
|
parutils/logging/sl.py,sha256=3-sj_o33cZmOqeFxlTl5HyHOvSAhn9glYcc-BmTUpZc,1164
|
19
|
-
ParUtils-1.2.
|
20
|
-
ParUtils-1.2.
|
21
|
-
ParUtils-1.2.
|
22
|
-
ParUtils-1.2.
|
23
|
-
ParUtils-1.2.
|
19
|
+
ParUtils-1.2.4.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
20
|
+
ParUtils-1.2.4.dist-info/METADATA,sha256=lKylRNkXvhQfauNzKFWolRssvyxgC1G0IZ7xEALSSlw,5285
|
21
|
+
ParUtils-1.2.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
22
|
+
ParUtils-1.2.4.dist-info/top_level.txt,sha256=1MDobUcroeYEvdupZCAFvA5hJjm7LSDUV5A4jHySNis,9
|
23
|
+
ParUtils-1.2.4.dist-info/RECORD,,
|
parutils/changelog.py
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
__VERSION__ = '1.2.
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
1
|
+
__VERSION__ = '1.2.4'
|
2
|
+
# !dir -> log_dir
|
3
|
+
# const to default kwargs
|
4
|
+
# Logger kwargs comments
|
5
|
+
|
6
|
+
# __VERSION__ = '1.2.3'
|
7
|
+
# # close_logger returns the closed logger object
|
8
|
+
# # no more stip('\n') in save_list
|
9
|
+
# # empty_log_every_buffer
|
5
10
|
|
6
11
|
# __VERSION__ = '1.2.2'
|
7
12
|
# # log_every
|
parutils/logging/const.py
CHANGED
parutils/logging/logger.py
CHANGED
@@ -16,12 +16,12 @@ class Logger:
|
|
16
16
|
self,
|
17
17
|
file_label='',
|
18
18
|
force_new_logger=False,
|
19
|
-
level=
|
20
|
-
log_format=
|
21
|
-
file_write=True,
|
22
|
-
|
23
|
-
file_format=
|
24
|
-
log_every=1,
|
19
|
+
level=0,
|
20
|
+
log_format='%H:%M:%S - ',
|
21
|
+
file_write=True, # Logs are written in a file or not
|
22
|
+
log_dir=None, # Directory where the log file is saved (default is 'log')
|
23
|
+
file_format='%Y%m%d_%H%M%S',
|
24
|
+
log_every=1, # If equals to n, the log file will be written only every n logs. That can significantly improve perfs when writing logs to high latency places (eg. network drives)
|
25
25
|
) -> None:
|
26
26
|
from . import g
|
27
27
|
|
@@ -32,8 +32,8 @@ class Logger:
|
|
32
32
|
self.logs = []
|
33
33
|
self.buffer = ''
|
34
34
|
self.err_count = 0
|
35
|
-
self.level = level
|
36
|
-
self.log_format = log_format
|
35
|
+
self.level = level
|
36
|
+
self.log_format = log_format
|
37
37
|
self.file_write = file_write
|
38
38
|
self.start_time = time()
|
39
39
|
|
@@ -44,8 +44,8 @@ class Logger:
|
|
44
44
|
if not file_write:
|
45
45
|
return
|
46
46
|
self.file_label = file_label
|
47
|
-
self.dir =
|
48
|
-
self.file_format = file_format
|
47
|
+
self.dir = log_dir if log_dir else const.DEFAULT_DIR
|
48
|
+
self.file_format = file_format
|
49
49
|
file_base_name = datetime.now().strftime(self.file_format)
|
50
50
|
if self.file_label:
|
51
51
|
file_base_name += '_' + self.file_label
|
File without changes
|
File without changes
|
File without changes
|