logger-36 2024.13__py3-none-any.whl → 2024.15__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.
- logger_36/__init__.py +1 -0
- logger_36/catalog/handler/console.py +4 -0
- logger_36/catalog/handler/console_rich.py +4 -0
- logger_36/catalog/handler/file.py +5 -0
- logger_36/type/issue.py +8 -1
- logger_36/type/logger.py +17 -1
- logger_36/version.py +1 -1
- {logger_36-2024.13.dist-info → logger_36-2024.15.dist-info}/METADATA +2 -2
- {logger_36-2024.13.dist-info → logger_36-2024.15.dist-info}/RECORD +11 -11
- {logger_36-2024.13.dist-info → logger_36-2024.15.dist-info}/WHEEL +1 -1
- {logger_36-2024.13.dist-info → logger_36-2024.15.dist-info}/top_level.txt +0 -0
logger_36/__init__.py
CHANGED
@@ -147,6 +147,10 @@ class console_rich_handler_t(lggg.Handler):
|
|
147
147
|
richer = cls.HighlightedVersion(first, next_s, record.levelno)
|
148
148
|
self.console.print(richer, crop=False, overflow="ignore")
|
149
149
|
|
150
|
+
def ShowMessage(self, message: str, /) -> None:
|
151
|
+
""""""
|
152
|
+
self.console.print(message, crop=False, overflow="ignore")
|
153
|
+
|
150
154
|
@classmethod
|
151
155
|
def HighlightedVersion(
|
152
156
|
cls, first_line: str, next_lines: str | None, log_level: int, /
|
@@ -91,3 +91,8 @@ class file_handler_t(lggg.FileHandler):
|
|
91
91
|
message, _ = self.FormattedLines(record, should_join_lines=True)
|
92
92
|
print(message, file=self.stream)
|
93
93
|
self.stream.flush()
|
94
|
+
|
95
|
+
def ShowMessage(self, message: str, /) -> None:
|
96
|
+
""""""
|
97
|
+
print(message, file=self.stream)
|
98
|
+
self.stream.flush()
|
logger_36/type/issue.py
CHANGED
@@ -33,6 +33,7 @@ import typing as h
|
|
33
33
|
|
34
34
|
from logger_36.config.issue import ISSUE_BASE_CONTEXT
|
35
35
|
from logger_36.constant.generic import NOT_PASSED
|
36
|
+
from logger_36.constant.message import expected_op_h
|
36
37
|
from logger_36.task.format.message import FormattedMessage
|
37
38
|
|
38
39
|
issue_t = str
|
@@ -46,12 +47,18 @@ def NewIssue(
|
|
46
47
|
*,
|
47
48
|
actual: h.Any = NOT_PASSED,
|
48
49
|
expected: h.Any | None = None,
|
50
|
+
expected_op: expected_op_h = "=",
|
51
|
+
with_final_dot: bool = True,
|
49
52
|
) -> issue_t:
|
50
53
|
""""""
|
51
54
|
if context.__len__() == 0:
|
52
55
|
context = ISSUE_BASE_CONTEXT
|
53
56
|
message = FormattedMessage(
|
54
|
-
message,
|
57
|
+
message,
|
58
|
+
actual=actual,
|
59
|
+
expected=expected,
|
60
|
+
expected_op=expected_op,
|
61
|
+
with_final_dot=with_final_dot,
|
55
62
|
)
|
56
63
|
|
57
64
|
return f"{context}{separator}{message}"
|
logger_36/type/logger.py
CHANGED
@@ -53,6 +53,7 @@ from logger_36.constant.logger import (
|
|
53
53
|
logger_handle_h,
|
54
54
|
)
|
55
55
|
from logger_36.constant.memory import UNKNOWN_MEMORY_USAGE
|
56
|
+
from logger_36.constant.message import expected_op_h
|
56
57
|
from logger_36.constant.record import SHOW_MEMORY_ATTR, SHOW_W_RULE_ATTR
|
57
58
|
from logger_36.task.format.memory import (
|
58
59
|
FormattedUsageWithAutoUnit as FormattedMemoryUsage,
|
@@ -262,11 +263,19 @@ class logger_t(lggg.Logger):
|
|
262
263
|
*,
|
263
264
|
actual: h.Any = NOT_PASSED,
|
264
265
|
expected: h.Any | None = None,
|
266
|
+
expected_op: expected_op_h = "=",
|
267
|
+
with_final_dot: bool = False,
|
265
268
|
) -> None:
|
266
269
|
""""""
|
267
270
|
context = ISSUE_CONTEXT_SEPARATOR.join(self.context_levels)
|
268
271
|
issue = NewIssue(
|
269
|
-
context,
|
272
|
+
context,
|
273
|
+
ISSUE_CONTEXT_END,
|
274
|
+
message,
|
275
|
+
actual=actual,
|
276
|
+
expected=expected,
|
277
|
+
expected_op=expected_op,
|
278
|
+
with_final_dot=with_final_dot,
|
270
279
|
)
|
271
280
|
self.staged_issues.append(issue)
|
272
281
|
|
@@ -316,6 +325,13 @@ class logger_t(lggg.Logger):
|
|
316
325
|
self.log(level, issues, stacklevel=2)
|
317
326
|
self.staged_issues.clear()
|
318
327
|
|
328
|
+
def ShowMessage(self, message: str, /) -> None:
|
329
|
+
""""""
|
330
|
+
for handler in self.handlers:
|
331
|
+
ShowMessage = getattr(handler, "ShowMessage", None)
|
332
|
+
if ShowMessage is not None:
|
333
|
+
ShowMessage(message)
|
334
|
+
|
319
335
|
def __enter__(self) -> None:
|
320
336
|
""""""
|
321
337
|
pass
|
logger_36/version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: logger-36
|
3
|
-
Version: 2024.
|
3
|
+
Version: 2024.15
|
4
4
|
Summary: Simple logger with a catalog of handlers
|
5
5
|
Home-page: https://src.koda.cnrs.fr/eric.debreuve/logger-36/
|
6
6
|
Author: Eric Debreuve
|
@@ -104,7 +104,7 @@ The development relies on several packages:
|
|
104
104
|
- Mandatory: |DEPENDENCIES_MANDATORY|
|
105
105
|
- Optional: |DEPENDENCIES_OPTIONAL|
|
106
106
|
|
107
|
-
The mandatory dependencies are installed automatically by `pip <https://pip.pypa.io/>`_, if they are not already, as part of the installation of |PROJECT_NAME|.
|
107
|
+
The mandatory dependencies, if any, are installed automatically by `pip <https://pip.pypa.io/>`_, if they are not already, as part of the installation of |PROJECT_NAME|.
|
108
108
|
Python distribution platforms or Integrated Development Environments (IDEs) should also take care of this.
|
109
109
|
The optional dependencies, if any, must be installed independently by following the related instructions, for added functionalities of |PROJECT_NAME|.
|
110
110
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
logger_36/__init__.py,sha256=
|
1
|
+
logger_36/__init__.py,sha256=WgqLqpWkAv96RHGnjQE9wzMrV_XRTabf1Nr5g7yh9T0,1817
|
2
2
|
logger_36/instance.py,sha256=wAVty29f24SCs4FRL600QySlA_WeLUM78p4t_Ni-LzA,1618
|
3
3
|
logger_36/main.py,sha256=H0MW3hZXdXHjTnliH8GNJkjqPZITLTaeaNH7lZPPFFI,6822
|
4
|
-
logger_36/version.py,sha256=
|
4
|
+
logger_36/version.py,sha256=DMqg9uNWcK_ghcTizcG-fDSBlegMUkX3wc7xxzfYxjI,1578
|
5
5
|
logger_36/catalog/config/console_rich.py,sha256=XKRKJx_5dxp4mgan1D-u_qrQos-pezRccqKsnmn-ook,2119
|
6
|
-
logger_36/catalog/handler/console.py,sha256=
|
7
|
-
logger_36/catalog/handler/console_rich.py,sha256=
|
8
|
-
logger_36/catalog/handler/file.py,sha256=
|
6
|
+
logger_36/catalog/handler/console.py,sha256=QaSxXmBYp1rVRu7lj17KPQiDyLOgb6GLmh3orIx9mv0,3296
|
7
|
+
logger_36/catalog/handler/console_rich.py,sha256=k8aTPBtIrL8tjIYhN4F2rGCPB2t8f1fWwFHhn33y2gs,6759
|
8
|
+
logger_36/catalog/handler/file.py,sha256=K1bIS8fAT1aOWllWNag9mSabairxRfgZSGKub9dl8cE,3757
|
9
9
|
logger_36/catalog/handler/generic.py,sha256=xpFnMuG3d9Xr2i5Tu_y8pU2Ohuu6CeZ4oGg5xyHmTtQ,6435
|
10
10
|
logger_36/catalog/logging/chronos.py,sha256=zVe5ZwB63mqNqlIDm6ZBi4-U5n_n-21h8umhimRUcdU,1815
|
11
11
|
logger_36/catalog/logging/gpu.py,sha256=0XqVVK_TV1QPEwGXyK99jThHAjfsf-V__3m9Jh4gewk,2783
|
@@ -32,9 +32,9 @@ logger_36/task/format/rule.py,sha256=cq4jl_ZCb8m7QoX8mWevXhy1hgwncLpc-9woKoT7m24
|
|
32
32
|
logger_36/task/measure/chronos.py,sha256=7xZskYEXQCPDypmnlhn4KDCBB1v3eL1OE_sv-l3n8Do,2255
|
33
33
|
logger_36/task/measure/memory.py,sha256=aichGI-iCeE3Z4Y8AmWGdal2931IMdcdv4VgCeDLBoI,1876
|
34
34
|
logger_36/type/extension.py,sha256=U28VqEL3Wq_E_TZ-ZlBAXRyTr9oVPnA6ez7EyHjKM0E,7673
|
35
|
-
logger_36/type/issue.py,sha256=
|
36
|
-
logger_36/type/logger.py,sha256=
|
37
|
-
logger_36-2024.
|
38
|
-
logger_36-2024.
|
39
|
-
logger_36-2024.
|
40
|
-
logger_36-2024.
|
35
|
+
logger_36/type/issue.py,sha256=nFdHjLaRxWfu2MgKZLuanuH9pQPXHzHXEo6wJRaMaDE,2344
|
36
|
+
logger_36/type/logger.py,sha256=u6yQvkTIHjY73JRk1OmxMLoTLiK662-tE5ynR-9JIco,13708
|
37
|
+
logger_36-2024.15.dist-info/METADATA,sha256=XI74Rcy8KbFj7lHo4Z7m-JeGMUccTZ9QginnVxuMGac,5601
|
38
|
+
logger_36-2024.15.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
39
|
+
logger_36-2024.15.dist-info/top_level.txt,sha256=sM95BTMWmslEEgR_1pzwZsOeSp8C_QBiu8ImbFr0XLc,10
|
40
|
+
logger_36-2024.15.dist-info/RECORD,,
|
File without changes
|