unitlog 0.0.1__py3-none-any.whl → 0.0.3__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.
unitlog/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.1"
1
+ __version__ = "0.0.3"
unitlog/unit.py CHANGED
@@ -35,7 +35,7 @@ class UnitLog(object):
35
35
  self.started: Event = mp.Event()
36
36
  self.stopped: Event = mp.Event()
37
37
  self.log_num = mp.Value('i', 0)
38
- self.worker = mp.Process(target=self.listening_log_msg, daemon=False)
38
+ self.worker = mp.Process(target=self.listening_log_msg, daemon=True)
39
39
  self._proxy_handler_map = {}
40
40
 
41
41
  def _init_proxy_handler(self, log_box: LogBox) -> PoxyConsoleLogWriter:
@@ -66,6 +66,8 @@ class UnitLog(object):
66
66
  if self.stopped.is_set():
67
67
  break
68
68
  continue
69
+ except KeyboardInterrupt:
70
+ continue
69
71
  try:
70
72
  handler = self._init_proxy_handler(log_box)
71
73
 
@@ -0,0 +1,33 @@
1
+ Metadata-Version: 2.1
2
+ Name: unitlog
3
+ Version: 0.0.3
4
+ Home-page: https://github.com/yujun2647/unitlog
5
+ Download-URL:
6
+ Author: walkerjun
7
+ Author-email: yujun2647@163.com
8
+ License: Apache-2.0
9
+ Requires-Python: >=3.6
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+
13
+ # unitlog
14
+
15
+ ## About
16
+
17
+ manage log sending through one process
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ import logging
23
+
24
+ from unitlog.unit import register_logger
25
+
26
+ logger1 = logging.getLogger("test1")
27
+
28
+ register_logger(name=logger1.name, file_log=True,
29
+ log_filepath="./temp/test1.log")
30
+
31
+ logger1.info("hello")
32
+
33
+ ```
@@ -0,0 +1,9 @@
1
+ unitlog/__init__.py,sha256=4GZKi13lDTD25YBkGakhZyEQZWTER_OWQMNPoH_UM2c,22
2
+ unitlog/handlers.py,sha256=K0ph6OxZey8AA7ZuxEycqEkEgZnckghsmN0NKxNg_bI,1768
3
+ unitlog/unit.py,sha256=dOgn40pq1H7yUCxLQBM2ehe6nGGBcg-lXWY3Tkl4-rE,4753
4
+ unitlog/util_log.py,sha256=dbdImt7acamMl1u2HaHgj1Lf0-EF9KnqcLOGr9yPDi8,5202
5
+ unitlog-0.0.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
+ unitlog-0.0.3.dist-info/METADATA,sha256=5GXpOu6R4Rw6XEfWIrR_TBhPHtcSd_djjtrHbevyJ9M,574
7
+ unitlog-0.0.3.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
8
+ unitlog-0.0.3.dist-info/top_level.txt,sha256=u_R9qvDeq23Wg6BGAP1QB7CuDosByWfI-EfXWa2MO-c,8
9
+ unitlog-0.0.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (71.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,12 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: unitlog
3
- Version: 0.0.1
4
- Home-page: https://github.com/yujun2647/unitlog
5
- Download-URL:
6
- Author: walkerjun
7
- Author-email: yujun2647@163.com
8
- License: Apache-2.0
9
- Requires-Python: >=3.6
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
-
@@ -1,9 +0,0 @@
1
- unitlog/__init__.py,sha256=sXLh7g3KC4QCFxcZGBTpG2scR7hmmBsMjq6LqRptkRg,22
2
- unitlog/handlers.py,sha256=K0ph6OxZey8AA7ZuxEycqEkEgZnckghsmN0NKxNg_bI,1768
3
- unitlog/unit.py,sha256=4JhqZFc-dIpho95_ckwm_P2MU8YkgIJ5ia5lz2K-6Dw,4691
4
- unitlog/util_log.py,sha256=dbdImt7acamMl1u2HaHgj1Lf0-EF9KnqcLOGr9yPDi8,5202
5
- unitlog-0.0.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
6
- unitlog-0.0.1.dist-info/METADATA,sha256=JDfHf9z7vebekhDLrm7dXX7KgosTu5_6XS6Ob-HjayI,270
7
- unitlog-0.0.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
8
- unitlog-0.0.1.dist-info/top_level.txt,sha256=u_R9qvDeq23Wg6BGAP1QB7CuDosByWfI-EfXWa2MO-c,8
9
- unitlog-0.0.1.dist-info/RECORD,,