pyquoks 1.3.0__py3-none-any.whl → 1.3.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.
- pyquoks/data.py +16 -3
- {pyquoks-1.3.0.dist-info → pyquoks-1.3.1.dist-info}/METADATA +1 -1
- pyquoks-1.3.1.dist-info/RECORD +10 -0
- pyquoks-1.3.0.dist-info/RECORD +0 -10
- {pyquoks-1.3.0.dist-info → pyquoks-1.3.1.dist-info}/WHEEL +0 -0
- {pyquoks-1.3.0.dist-info → pyquoks-1.3.1.dist-info}/licenses/LICENSE +0 -0
- {pyquoks-1.3.0.dist-info → pyquoks-1.3.1.dist-info}/top_level.txt +0 -0
pyquoks/data.py
CHANGED
|
@@ -477,12 +477,18 @@ class LoggerService(logging.Logger):
|
|
|
477
477
|
Class that provides methods for parallel logging
|
|
478
478
|
"""
|
|
479
479
|
|
|
480
|
+
_LOGS_PATH: str | None
|
|
481
|
+
"""
|
|
482
|
+
Path to the logs file
|
|
483
|
+
"""
|
|
484
|
+
|
|
480
485
|
def __init__(
|
|
481
486
|
self,
|
|
482
|
-
name: str,
|
|
487
|
+
name: str,
|
|
488
|
+
path: str = utils.get_path("logs/", only_abspath=True),
|
|
483
489
|
filename: str = datetime.datetime.now().strftime("%d-%m-%y-%H-%M-%S"),
|
|
490
|
+
file_handling: bool = True,
|
|
484
491
|
level: int = logging.NOTSET,
|
|
485
|
-
path: str = utils.get_path("logs/", only_abspath=True),
|
|
486
492
|
) -> None:
|
|
487
493
|
super().__init__(name, level)
|
|
488
494
|
|
|
@@ -498,9 +504,10 @@ class LoggerService(logging.Logger):
|
|
|
498
504
|
|
|
499
505
|
if file_handling:
|
|
500
506
|
os.makedirs(path, exist_ok=True)
|
|
507
|
+
self._LOG_PATH = path + f"{filename}-{name}.log"
|
|
501
508
|
|
|
502
509
|
file_handler = logging.FileHandler(
|
|
503
|
-
|
|
510
|
+
self._LOG_PATH,
|
|
504
511
|
encoding="utf-8",
|
|
505
512
|
)
|
|
506
513
|
file_handler.setFormatter(
|
|
@@ -512,6 +519,12 @@ class LoggerService(logging.Logger):
|
|
|
512
519
|
)
|
|
513
520
|
self.addHandler(file_handler)
|
|
514
521
|
|
|
522
|
+
def get_logs_file(self) -> io.BufferedReader:
|
|
523
|
+
"""
|
|
524
|
+
:return: Opened file-like object of current logs
|
|
525
|
+
"""
|
|
526
|
+
return open(self._LOG_PATH, "rb")
|
|
527
|
+
|
|
515
528
|
def log_exception(self, e: Exception) -> None:
|
|
516
529
|
"""
|
|
517
530
|
Logs an exception with detailed traceback
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
pyquoks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
pyquoks/data.py,sha256=3cN7aJ2KA76obAd-HSicAoi-iBdWWA0UoVGjoA-Zm04,15712
|
|
3
|
+
pyquoks/localhost.py,sha256=2sl1CovYrnIzBYW-eKDIYOfi5bUsSVTAdQobzAHpIys,828
|
|
4
|
+
pyquoks/models.py,sha256=kdduuHgh8RLe8_S5Lmv3jS6hqsZG-oYQhPTgk2C11ug,4171
|
|
5
|
+
pyquoks/utils.py,sha256=lcHZyIFIflGMqAhDkqm8GWOUFwb2f-IHgIPZxEiHBz0,484
|
|
6
|
+
pyquoks-1.3.1.dist-info/licenses/LICENSE,sha256=eEd8UIYxvKUY7vqrV1XTFo70_FQdiW6o1fznseCXRJs,1095
|
|
7
|
+
pyquoks-1.3.1.dist-info/METADATA,sha256=vdMarZ4P0WjHFerCe5cDYNz7u6Sb_X7Uxb9A-r7TxHg,1802
|
|
8
|
+
pyquoks-1.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
pyquoks-1.3.1.dist-info/top_level.txt,sha256=4Eqn44TCCp-D8V6To92e8-KKr49ZGf0dCcsdRQmPkhc,8
|
|
10
|
+
pyquoks-1.3.1.dist-info/RECORD,,
|
pyquoks-1.3.0.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
pyquoks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
pyquoks/data.py,sha256=5PkERLBiNmuEYy8mYTe2AWUUEPt3lAtH5tG9TlyBl4w,15399
|
|
3
|
-
pyquoks/localhost.py,sha256=2sl1CovYrnIzBYW-eKDIYOfi5bUsSVTAdQobzAHpIys,828
|
|
4
|
-
pyquoks/models.py,sha256=kdduuHgh8RLe8_S5Lmv3jS6hqsZG-oYQhPTgk2C11ug,4171
|
|
5
|
-
pyquoks/utils.py,sha256=lcHZyIFIflGMqAhDkqm8GWOUFwb2f-IHgIPZxEiHBz0,484
|
|
6
|
-
pyquoks-1.3.0.dist-info/licenses/LICENSE,sha256=eEd8UIYxvKUY7vqrV1XTFo70_FQdiW6o1fznseCXRJs,1095
|
|
7
|
-
pyquoks-1.3.0.dist-info/METADATA,sha256=sCQPZSFYT7zfM4hFygVOeCWHXz1QEt7i9oOzhmKGNgw,1802
|
|
8
|
-
pyquoks-1.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
pyquoks-1.3.0.dist-info/top_level.txt,sha256=4Eqn44TCCp-D8V6To92e8-KKr49ZGf0dCcsdRQmPkhc,8
|
|
10
|
-
pyquoks-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|