logging-ext2 0.1.1__py3-none-any.whl → 0.2.0__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.
logging_ext2/__about__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present Xiang Wang <ramwin@qq.com>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.1.1"
4
+ __version__ = "0.2.0"
logging_ext2/handlers.py CHANGED
@@ -67,5 +67,11 @@ class TimedRotatingFileHandler(Handler):
67
67
  # permission denied or file not found
68
68
  if to_gzip_path.suffix == ".gz":
69
69
  continue
70
- subprocess.run(["gzip", to_gzip_path])
70
+ self.base_dir.joinpath(self.filename).touch()
71
+ cmds = ["flock",
72
+ "--nonblock",
73
+ self.base_dir.joinpath(self.filename),
74
+ "--command",
75
+ f"gzip {to_gzip_path}"]
76
+ subprocess.run(cmds)
71
77
  self.stream = self.init_stream()
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: logging-ext2
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: extend python logging library
5
- Project-URL: Documentation, https://github.com/ramwin/logging-ext2#readme
6
- Project-URL: Issues, https://github.com/ramwin/logging-ext2/issues
7
- Project-URL: Source, https://github.com/ramwin/logging-ext2
5
+ Project-URL: Documentation, https://github.com/ramwin/logging-ext#readme
6
+ Project-URL: Issues, https://github.com/ramwin/logging-ext/issues
7
+ Project-URL: Source, https://github.com/ramwin/logging-ext
8
8
  Author-email: Xiang Wang <ramwin@qq.com>
9
9
  License-Expression: MIT
10
10
  License-File: LICENSE
@@ -0,0 +1,8 @@
1
+ logging_ext2/__about__.py,sha256=_5frGGck8TSRy4BEkicUdrNJZN8-umwWxzaLivX4aaU,121
2
+ logging_ext2/__init__.py,sha256=BA6rgdmh3z2v01cbHU1FRMsBIRV5vQjh2w9FzG2F2GY,99
3
+ logging_ext2/handlers.py,sha256=R2nsK885RWR1ItbzQmKMsYwCgsCXaHQ7NKrlA1Py_Gw,2665
4
+ logging_ext2/types.py,sha256=cLjODjTgxrZEXUZzOkrFm3s6bUG3Itc_fS7KJ-MSWC8,237
5
+ logging_ext2-0.2.0.dist-info/METADATA,sha256=v-q-UmYw7rz_z5E30TjUwIMsyg90z731Rdfzl105IlM,1429
6
+ logging_ext2-0.2.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ logging_ext2-0.2.0.dist-info/licenses/LICENSE,sha256=RckqF9bdq7oO9RrL4iZYuXNhkIcXexbXNF2ToiaJymU,1067
8
+ logging_ext2-0.2.0.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- logging_ext2/__about__.py,sha256=dUD12_Yld6eHDkVgnh7xRbdn7GnASh_rEWJHddnGRWM,121
2
- logging_ext2/__init__.py,sha256=BA6rgdmh3z2v01cbHU1FRMsBIRV5vQjh2w9FzG2F2GY,99
3
- logging_ext2/handlers.py,sha256=lG5CnPSO0fYouzmwfReASCCRzZzLv7gwKY8WCJHImy0,2426
4
- logging_ext2/types.py,sha256=cLjODjTgxrZEXUZzOkrFm3s6bUG3Itc_fS7KJ-MSWC8,237
5
- logging_ext2-0.1.1.dist-info/METADATA,sha256=RakQuZBY63XwALF-iINnVZDN4VJedwZXiyGY5oicU4U,1432
6
- logging_ext2-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- logging_ext2-0.1.1.dist-info/licenses/LICENSE,sha256=RckqF9bdq7oO9RrL4iZYuXNhkIcXexbXNF2ToiaJymU,1067
8
- logging_ext2-0.1.1.dist-info/RECORD,,