logger-36 2025.26__tar.gz → 2025.27__tar.gz
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.
- {logger_36-2025.26 → logger_36-2025.27}/PKG-INFO +1 -1
- {logger_36-2025.26 → logger_36-2025.27}/documentation/wiki/description.asciidoc +1 -15
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/type/logger.py +14 -23
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/version.py +1 -1
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36.egg-info/PKG-INFO +1 -1
- {logger_36-2025.26 → logger_36-2025.27}/MANIFEST.in +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/README-COPYRIGHT-utf8.txt +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/README-LICENCE-utf8.txt +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/README.rst +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/__init__.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/api/chronos.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/api/logger.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/api/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/api/message.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/api/storage.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/config/console_rich.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/config/optional.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/handler/console.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/handler/console_rich.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/handler/file.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/handler/generic.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/handler/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/logger/chronos.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/logger/gpu.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/logger/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/catalog/logger/system.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/config/issue.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/config/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/config/message.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/config/rule.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/config/system.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/chronos.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/error.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/html.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/issue.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/logger.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/message.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/path.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/record.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/rule.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/constant/system.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/extension/file.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/extension/inspection.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/extension/line.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/extension/sentinel.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/instance/logger.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/instance/loggers.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/task/format/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/task/format/message.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/task/measure/chronos.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/task/measure/memory.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/task/storage.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/type/handler.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/type/issue.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36/type/loggers.py +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36.egg-info/SOURCES.txt +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36.egg-info/dependency_links.txt +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/package/logger_36.egg-info/top_level.txt +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/pyproject.toml +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/setup.cfg +0 -0
- {logger_36-2025.26 → logger_36-2025.27}/setup.py +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
// Copyright CNRS/
|
1
|
+
// Copyright CNRS (https://www.cnrs.fr/index.php/en)
|
2
2
|
// Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
3
3
|
// SEE COPYRIGHT NOTICE BELOW
|
4
4
|
|
@@ -59,17 +59,3 @@
|
|
59
59
|
// knowledge of the CeCILL license and that you accept its terms.
|
60
60
|
//
|
61
61
|
// SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
|
62
|
-
//
|
63
|
-
// This software is being developed by Eric Debreuve, a CNRS employee and
|
64
|
-
// member of team Morpheme.
|
65
|
-
// Team Morpheme is a joint team between Inria, CNRS, and UniCA.
|
66
|
-
// It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
|
67
|
-
// I3S, and Laboratory iBV.
|
68
|
-
//
|
69
|
-
// CNRS: https://www.cnrs.fr/index.php/en
|
70
|
-
// Inria: https://www.inria.fr/en/
|
71
|
-
// UniCA: https://univ-cotedazur.eu/
|
72
|
-
// Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
|
73
|
-
// I3S: https://www.i3s.unice.fr/en/
|
74
|
-
// iBV: http://ibv.unice.fr/
|
75
|
-
// Team Morpheme: https://team.inria.fr/morpheme/
|
@@ -9,7 +9,6 @@ import inspect as e
|
|
9
9
|
import logging as l
|
10
10
|
import multiprocessing as prll
|
11
11
|
import sys as s
|
12
|
-
import textwrap as text
|
13
12
|
import threading as thrd
|
14
13
|
import traceback as tcbk
|
15
14
|
import types as t
|
@@ -41,7 +40,7 @@ from logger_36.constant.chronos import DATE_ORIGIN, DATE_TIME_ORIGIN
|
|
41
40
|
from logger_36.constant.issue import ISSUE_LEVEL_SEPARATOR, ORDER, order_h
|
42
41
|
from logger_36.constant.logger import WARNING_LOGGER_NAME, WARNING_TYPE_COMPILED_PATTERN
|
43
42
|
from logger_36.constant.memory import UNKNOWN_MEMORY_USAGE
|
44
|
-
from logger_36.constant.message import
|
43
|
+
from logger_36.constant.message import expected_op_h
|
45
44
|
from logger_36.constant.path import USER_FOLDER, LAUNCH_ROOT_FILE_relative
|
46
45
|
from logger_36.constant.record import (
|
47
46
|
HAS_ACTUAL_EXPECTED_ATTR,
|
@@ -56,7 +55,6 @@ from logger_36.extension.sentinel import NOT_PASSED
|
|
56
55
|
from logger_36.task.format.message import MessageWithActualExpected
|
57
56
|
from logger_36.task.measure.chronos import FormattedElapsedTime
|
58
57
|
from logger_36.task.measure.memory import CurrentUsage as CurrentMemoryUsage
|
59
|
-
from logger_36.type.handler import extension_t as handler_extension_t
|
60
58
|
from logger_36.type.handler import handler_h as base_handler_h
|
61
59
|
from logger_36.type.issue import NewIssue, issue_t
|
62
60
|
|
@@ -449,7 +447,7 @@ class logger_t(base_t):
|
|
449
447
|
"""
|
450
448
|
For a print-like calling for print-based debugging.
|
451
449
|
"""
|
452
|
-
separator = kwargs.
|
450
|
+
separator = kwargs.pop("separator", " ")
|
453
451
|
|
454
452
|
frame = e.stack(context=0)[1][0] # 1=caller.
|
455
453
|
details = e.getframeinfo(frame, context=0)
|
@@ -458,7 +456,10 @@ class logger_t(base_t):
|
|
458
456
|
path = path.relative_to(USER_FOLDER)
|
459
457
|
where = f"{str(path.with_suffix(''))}:{details.function}:{details.lineno}"
|
460
458
|
|
461
|
-
self.info(
|
459
|
+
self.info(
|
460
|
+
separator.join(map(str, args)) + f"\n{WHERE_SEPARATOR} " + where,
|
461
|
+
extra=kwargs,
|
462
|
+
)
|
462
463
|
|
463
464
|
def Log(
|
464
465
|
self,
|
@@ -471,6 +472,7 @@ class logger_t(base_t):
|
|
471
472
|
expected_is_choices: bool = False,
|
472
473
|
expected_op: expected_op_h = "=",
|
473
474
|
with_final_dot: bool = True,
|
475
|
+
**extra,
|
474
476
|
) -> None:
|
475
477
|
""""""
|
476
478
|
if isinstance(level, str):
|
@@ -483,25 +485,12 @@ class logger_t(base_t):
|
|
483
485
|
expected_op=expected_op,
|
484
486
|
with_final_dot=with_final_dot,
|
485
487
|
)
|
486
|
-
|
487
|
-
extra = {HAS_ACTUAL_EXPECTED_ATTR: True}
|
488
|
-
else:
|
489
|
-
extra = {}
|
488
|
+
extra[HAS_ACTUAL_EXPECTED_ATTR] = has_actual_expected
|
490
489
|
self.log(level, message, extra=extra)
|
491
490
|
|
492
|
-
def LogAsIs(self, message: str,
|
491
|
+
def LogAsIs(self, message: str, /) -> None:
|
493
492
|
""""""
|
494
|
-
|
495
|
-
message = text.indent(message, LINE_INDENT)
|
496
|
-
|
497
|
-
emit_message_name = handler_extension_t.EmitMessage.__name__
|
498
|
-
FallbackEmitMessage = print
|
499
|
-
for handler in self.handlers:
|
500
|
-
EmitMessage = getattr(handler, emit_message_name, FallbackEmitMessage)
|
501
|
-
if EmitMessage is not None:
|
502
|
-
EmitMessage(message)
|
503
|
-
if EmitMessage is print:
|
504
|
-
FallbackEmitMessage = None
|
493
|
+
self.log(l.INFO, message, extra={SHOW_WHEN_ATTR: False, SHOW_WHERE_ATTR: False})
|
505
494
|
|
506
495
|
info_raw = LogAsIs # To follow the convention of the logging methods info, error...
|
507
496
|
|
@@ -712,8 +701,10 @@ class logger_t(base_t):
|
|
712
701
|
|
713
702
|
def __del__(self) -> None:
|
714
703
|
""""""
|
715
|
-
if (
|
716
|
-
|
704
|
+
if (
|
705
|
+
(prll.current_process is not None)
|
706
|
+
and (prll.current_process().name == MAIN_PROCESS_NAME)
|
707
|
+
and (self.log_server is not None)
|
717
708
|
):
|
718
709
|
self.log_server.stop()
|
719
710
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|