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 CHANGED
@@ -36,4 +36,5 @@ from logger_36.main import (
36
36
  AddGenericHandler,
37
37
  AddRichConsoleHandler,
38
38
  )
39
+ from logger_36.task.format.message import FormattedMessage
39
40
  from logger_36.version import __version__
@@ -81,3 +81,7 @@ class console_handler_t(lggg.Handler):
81
81
  else:
82
82
  message, _ = self.FormattedLines(record, should_join_lines=True)
83
83
  print(message)
84
+
85
+ def ShowMessage(self, message: str, /) -> None:
86
+ """"""
87
+ print(message)
@@ -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, actual=actual, expected=expected, with_final_dot=False
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, ISSUE_CONTEXT_END, message, actual=actual, expected=expected
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
@@ -29,4 +29,4 @@
29
29
  # The fact that you are presently reading this means that you have had
30
30
  # knowledge of the CeCILL license and that you accept its terms.
31
31
 
32
- __version__ = "2024.13"
32
+ __version__ = "2024.15"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: logger-36
3
- Version: 2024.13
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=67ZAWtUx9Qy8Yn-tLQkOIEO6Z9U-8jhfm-tqNjjeFPU,1758
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=mdgjriUY276JSM3W1EzdgeLIIYLoA17Di2FfkJcKm7Y,1578
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=_CJcd9WiEQcfDZgcCPSSU_9ZlOqx8jztSuMNKy7bt04,3205
7
- logger_36/catalog/handler/console_rich.py,sha256=6tCWYe3fuDf10x1Qoobyal-DV9BQjbUWpJ6JvtFZ0Ac,6624
8
- logger_36/catalog/handler/file.py,sha256=kwRqDgGC8SP9Ojg652a71QzSGjIkerKv_cS7IITqJGE,3620
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=OnkBKRTMsHvZ-2aLQWtBzGSWMTVs_4ermg71Ygcs0w8,2153
36
- logger_36/type/logger.py,sha256=mBk1Bd7Iunu4utnz8UqBCQRhDW9spLZhBZ2hAH8mTZE,13199
37
- logger_36-2024.13.dist-info/METADATA,sha256=DD-SjP5m4_DkDUd3V_Ma1W1gJgrCWDjcYYzmx7JjedU,5592
38
- logger_36-2024.13.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
39
- logger_36-2024.13.dist-info/top_level.txt,sha256=sM95BTMWmslEEgR_1pzwZsOeSp8C_QBiu8ImbFr0XLc,10
40
- logger_36-2024.13.dist-info/RECORD,,
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,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5