logger-36 2025.17__py3-none-any.whl → 2025.19__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.
Files changed (55) hide show
  1. logger_36/__init__.py +1 -15
  2. logger_36/api/content.py +1 -16
  3. logger_36/api/gpu.py +1 -15
  4. logger_36/api/memory.py +1 -15
  5. logger_36/api/storage.py +1 -15
  6. logger_36/api/system.py +1 -15
  7. logger_36/api/time.py +1 -15
  8. logger_36/api/type.py +1 -15
  9. logger_36/catalog/config/console_rich.py +2 -16
  10. logger_36/catalog/config/optional.py +1 -15
  11. logger_36/catalog/handler/console.py +7 -24
  12. logger_36/catalog/handler/console_rich.py +14 -40
  13. logger_36/catalog/handler/file.py +5 -25
  14. logger_36/catalog/handler/generic.py +38 -81
  15. logger_36/catalog/logger/chronos.py +1 -15
  16. logger_36/catalog/logger/gpu.py +1 -15
  17. logger_36/catalog/logger/memory.py +1 -15
  18. logger_36/catalog/logger/system.py +1 -15
  19. logger_36/config/issue.py +1 -15
  20. logger_36/config/memory.py +1 -15
  21. logger_36/config/message.py +1 -15
  22. logger_36/config/system.py +1 -15
  23. logger_36/constant/error.py +1 -15
  24. logger_36/constant/generic.py +1 -15
  25. logger_36/constant/html.py +1 -15
  26. logger_36/constant/issue.py +1 -15
  27. logger_36/constant/logger.py +1 -15
  28. logger_36/constant/memory.py +1 -15
  29. logger_36/constant/message.py +1 -15
  30. logger_36/constant/path.py +2 -16
  31. logger_36/constant/record.py +1 -15
  32. logger_36/constant/{handler.py → rule.py} +5 -19
  33. logger_36/constant/system.py +1 -15
  34. logger_36/extension/html_.py +1 -15
  35. logger_36/extension/line.py +1 -15
  36. logger_36/instance/logger.py +3 -16
  37. logger_36/instance/loggers.py +1 -15
  38. logger_36/task/format/memory.py +1 -15
  39. logger_36/task/format/message.py +2 -75
  40. logger_36/task/inspection.py +1 -15
  41. logger_36/task/measure/chronos.py +1 -15
  42. logger_36/task/measure/memory.py +1 -15
  43. logger_36/task/storage.py +1 -15
  44. logger_36/type/handler.py +100 -79
  45. logger_36/type/issue.py +1 -15
  46. logger_36/type/logger.py +69 -85
  47. logger_36/type/loggers.py +2 -17
  48. logger_36/version.py +2 -16
  49. {logger_36-2025.17.dist-info → logger_36-2025.19.dist-info}/METADATA +2 -2
  50. logger_36-2025.19.dist-info/RECORD +52 -0
  51. logger_36/task/format/rule.py +0 -77
  52. logger_36/type/message.py +0 -90
  53. logger_36-2025.17.dist-info/RECORD +0 -54
  54. {logger_36-2025.17.dist-info → logger_36-2025.19.dist-info}/WHEEL +0 -0
  55. {logger_36-2025.17.dist-info → logger_36-2025.19.dist-info}/top_level.txt +0 -0
logger_36/type/issue.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright CNRS/Inria/UniCA
2
+ Copyright CNRS (https://www.cnrs.fr/index.php/en)
3
3
  Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
@@ -74,18 +74,4 @@ The fact that you are presently reading this means that you have had
74
74
  knowledge of the CeCILL license and that you accept its terms.
75
75
 
76
76
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
77
-
78
- This software is being developed by Eric Debreuve, a CNRS employee and
79
- member of team Morpheme.
80
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
81
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
82
- I3S, and Laboratory iBV.
83
-
84
- CNRS: https://www.cnrs.fr/index.php/en
85
- Inria: https://www.inria.fr/en/
86
- UniCA: https://univ-cotedazur.eu/
87
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
88
- I3S: https://www.i3s.unice.fr/en/
89
- iBV: http://ibv.unice.fr/
90
- Team Morpheme: https://team.inria.fr/morpheme/
91
77
  """
logger_36/type/logger.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright CNRS/Inria/UniCA
2
+ Copyright CNRS (https://www.cnrs.fr/index.php/en)
3
3
  Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
@@ -28,26 +28,28 @@ from logger_36.config.message import (
28
28
  ELAPSED_TIME_SEPARATOR,
29
29
  LONG_ENOUGH,
30
30
  TIME_FORMAT,
31
+ WHERE_SEPARATOR,
31
32
  )
32
33
  from logger_36.constant.error import MEMORY_MEASURE_ERROR
33
34
  from logger_36.constant.generic import NOT_PASSED
34
- from logger_36.constant.handler import HANDLER_KINDS, handler_codes_h
35
35
  from logger_36.constant.issue import ISSUE_LEVEL_SEPARATOR, ORDER, order_h
36
- from logger_36.constant.logger import (
37
- LOGGER_NAME,
38
- WARNING_LOGGER_NAME,
39
- WARNING_TYPE_COMPILED_PATTERN,
40
- )
36
+ from logger_36.constant.logger import WARNING_LOGGER_NAME, WARNING_TYPE_COMPILED_PATTERN
41
37
  from logger_36.constant.memory import UNKNOWN_MEMORY_USAGE
42
38
  from logger_36.constant.message import LINE_INDENT, TIME_LENGTH_m_1, expected_op_h
43
- from logger_36.constant.path import PROJECT_FILE_RELATIVE
39
+ from logger_36.constant.path import PROJECT_FILE_RELATIVE, USER_FOLDER
44
40
  from logger_36.constant.record import SHOW_W_RULE_ATTR, SHOW_WHERE_ATTR
45
- from logger_36.task.format.message import MessageFromRecord, MessageWithActualExpected
46
- from logger_36.task.format.rule import RuleAsText
41
+ from logger_36.constant.rule import (
42
+ DEFAULT_RULE,
43
+ DEFAULT_RULE_LENGTH,
44
+ MIN_HALF_RULE_LENGTH,
45
+ RULE_CHARACTER,
46
+ )
47
+ from logger_36.task.format.message import MessageWithActualExpected
47
48
  from logger_36.task.measure.chronos import ElapsedTime
48
49
  from logger_36.task.measure.memory import CanCheckUsage as CanCheckMemoryUsage
49
50
  from logger_36.task.measure.memory import CurrentUsage as CurrentMemoryUsage
50
51
  from logger_36.type.handler import any_handler_t as base_handler_t
52
+ from logger_36.type.handler import extension_t as handler_extension_t
51
53
  from logger_36.type.issue import NewIssue, issue_t
52
54
 
53
55
  if RICH_IS_AVAILABLE:
@@ -102,11 +104,12 @@ class logger_t(base_t):
102
104
  init=False, default_factory=dict
103
105
  )
104
106
  intercepts_exceptions: bool = d.field(init=False, default=False)
105
- _on_hold: list[l.LogRecord] = d.field(init=False, default_factory=list)
106
107
  _should_hold_messages: bool = d.field(init=False, default=True)
107
108
  _should_activate_log_interceptions: bool = d.field(init=False, default=False)
109
+ _on_hold: list[l.LogRecord] = d.field(init=False, default_factory=list)
110
+ _recording_handler: handler_extension_t | None = d.field(init=False, default=None)
108
111
 
109
- name_: d.InitVar[str] = LOGGER_NAME
112
+ name_: d.InitVar[str | None] = None
110
113
  level_: d.InitVar[int] = l.NOTSET
111
114
  activate_wrn_interceptions: d.InitVar[bool] = True
112
115
  activate_log_interceptions: d.InitVar[bool] = True
@@ -152,7 +155,7 @@ class logger_t(base_t):
152
155
 
153
156
  def __post_init__(
154
157
  self,
155
- name_: str,
158
+ name_: str | None,
156
159
  level_: int,
157
160
  activate_wrn_interceptions: bool,
158
161
  activate_log_interceptions: bool,
@@ -161,14 +164,15 @@ class logger_t(base_t):
161
164
  """"""
162
165
  global _MEMORY_MEASURE_ERROR
163
166
 
167
+ if name_ is None:
168
+ name_ = f"{type(self).__name__}:{hex(id(self))[2:]}"
169
+
164
170
  base_t.__init__(self, name_)
165
171
  self.setLevel(level_)
166
172
  self.propagate = False # Part of base_t.
167
173
 
168
- for level in l.getLevelNamesMapping().values():
169
- self.events[level] = 0
170
-
171
- self.info(f'New logger "{self.name}" for "{PROJECT_FILE_RELATIVE}"')
174
+ for level_id in l.getLevelNamesMapping().values():
175
+ self.events[level_id] = 0
172
176
 
173
177
  if activate_wrn_interceptions:
174
178
  self.ToggleWarningInterceptions(True)
@@ -180,12 +184,17 @@ class logger_t(base_t):
180
184
  if self.exit_on_error:
181
185
  self.exit_on_critical = True
182
186
 
187
+ if self.should_record_messages:
188
+ self.ActivateMessageRecording()
189
+
183
190
  if self.should_watch_memory_usage and not CanCheckMemoryUsage():
184
191
  self.should_watch_memory_usage = False
185
192
  if _MEMORY_MEASURE_ERROR is not None:
186
193
  s.__stderr__.write(_MEMORY_MEASURE_ERROR + "\n")
187
194
  _MEMORY_MEASURE_ERROR = None
188
195
 
196
+ self.info(f'New logger "{self.name}" for "{PROJECT_FILE_RELATIVE}"')
197
+
189
198
  def handle(self, record: l.LogRecord, /) -> None:
190
199
  """"""
191
200
  elapsed_time, now = ElapsedTime(should_return_now=True)
@@ -194,18 +203,20 @@ class logger_t(base_t):
194
203
  for held in self._on_hold:
195
204
  if self.should_record_messages:
196
205
  self.recorded.append(
197
- (held.levelno, MessageFromRecord(held, RuleAsText)[0])
206
+ (
207
+ held.levelno,
208
+ self._recording_handler.MessageFromRecord(held)[0],
209
+ )
198
210
  )
199
211
  base_t.handle(self, held)
200
212
  self._on_hold.clear()
201
213
 
202
214
  if (date := now.date()) != self.last_message_date:
203
215
  self.last_message_date = date
204
- # levelno: Added for management by logging.Logger.handle.
205
216
  date_record = l.makeLogRecord(
206
217
  {
207
218
  "name": self.name,
208
- "levelno": l.INFO,
219
+ "levelno": l.INFO, # For management by logging.Logger.handle.
209
220
  "msg": f"DATE: {date.strftime(DATE_FORMAT)}",
210
221
  SHOW_W_RULE_ATTR: True,
211
222
  }
@@ -217,18 +228,17 @@ class logger_t(base_t):
217
228
  self.recorded.append(
218
229
  (
219
230
  date_record.levelno,
220
- MessageFromRecord(date_record, RuleAsText)[0],
231
+ self._recording_handler.MessageFromRecord(date_record)[0],
221
232
  )
222
233
  )
223
234
  base_t.handle(self, date_record)
224
235
 
225
236
  # When.
226
237
  if now - self.last_message_now > LONG_ENOUGH:
227
- record.when_or_elapsed = now.strftime(TIME_FORMAT)
238
+ w_or_e = now.strftime(TIME_FORMAT)
228
239
  else:
229
- record.when_or_elapsed = (
230
- f"{ELAPSED_TIME_SEPARATOR}{elapsed_time:.<{TIME_LENGTH_m_1}}"
231
- )
240
+ w_or_e = f"{ELAPSED_TIME_SEPARATOR}{elapsed_time:.<{TIME_LENGTH_m_1}}"
241
+ record.when_or_elapsed = w_or_e
232
242
  self.last_message_now = now
233
243
 
234
244
  # Where.
@@ -241,7 +251,8 @@ class logger_t(base_t):
241
251
  module = str(module).replace(FOLDER_SEPARATOR, ".")
242
252
  break
243
253
  else:
244
- module = record.module
254
+ if module.is_relative_to(USER_FOLDER):
255
+ module = module.relative_to(USER_FOLDER)
245
256
  where = f"{module}:{record.funcName}:{record.lineno}"
246
257
  if should_show_where:
247
258
  record.where = where
@@ -260,7 +271,10 @@ class logger_t(base_t):
260
271
  else:
261
272
  if self.should_record_messages:
262
273
  self.recorded.append(
263
- (record.levelno, MessageFromRecord(record, RuleAsText)[0])
274
+ (
275
+ record.levelno,
276
+ self._recording_handler.MessageFromRecord(record)[0],
277
+ )
264
278
  )
265
279
  base_t.handle(self, record)
266
280
 
@@ -276,32 +290,11 @@ class logger_t(base_t):
276
290
  if self.should_watch_memory_usage:
277
291
  self.memory_usages.append((where, CurrentMemoryUsage()))
278
292
 
279
- def SetLevel(self, level: int, /, *, which: handler_codes_h | str = "a") -> None:
280
- """
281
- Set level of handlers, but the logger level is not modified.
282
-
283
- which: if not a handler_codes_h, then it corresponds to a handler name.
284
- """
285
- found = False
286
- for handler in self.handlers:
287
- if (
288
- (which == "a")
289
- or ((which in "cfg") and (getattr(handler, "kind", None) == which))
290
- or (which == handler.name)
291
- ):
292
- handler.setLevel(level)
293
- if which not in HANDLER_KINDS:
294
- return
295
- found = True
296
-
297
- if not found:
298
- raise ValueError(
299
- MessageWithActualExpected(
300
- "Handler not found",
301
- actual=which,
302
- expected=f"{str(HANDLER_KINDS)[1:-1]}, or a handler name",
303
- )
304
- )
293
+ def ActivateMessageRecording(self) -> None:
294
+ """"""
295
+ if self._recording_handler is None:
296
+ self._recording_handler = handler_extension_t("recording_handler", 0, None)
297
+ self.should_record_messages = True # Useless if called from __post_init__.
305
298
 
306
299
  def MakeMonochrome(self) -> None:
307
300
  """"""
@@ -324,8 +317,8 @@ class logger_t(base_t):
324
317
 
325
318
  def ResetEventCounts(self) -> None:
326
319
  """"""
327
- for level in self.events:
328
- self.events[level] = 0
320
+ for level_id in self.events:
321
+ self.events[level_id] = 0
329
322
 
330
323
  def ToggleWarningInterceptions(self, state: bool, /) -> None:
331
324
  """"""
@@ -416,13 +409,15 @@ class logger_t(base_t):
416
409
 
417
410
  def AddHandler(
418
411
  self,
419
- handler_t: type[base_handler_t],
412
+ handler_t_or_handler: type[base_handler_t]
413
+ | base_handler_t
414
+ | l.Handler
415
+ | l.FileHandler,
420
416
  /,
421
417
  *,
422
418
  name: str | None = None,
423
419
  level: int = l.INFO,
424
420
  message_width: int = -1,
425
- formatter: l.Formatter | None = None,
426
421
  should_still_hold_messages: bool = False,
427
422
  **kwargs,
428
423
  ) -> None:
@@ -433,13 +428,12 @@ class logger_t(base_t):
433
428
 
434
429
  self._should_hold_messages = should_still_hold_messages
435
430
 
436
- handler = handler_t.New(
437
- name=name,
438
- message_width=message_width,
439
- level=level,
440
- formatter=formatter,
441
- **kwargs,
442
- )
431
+ if isinstance(handler_t_or_handler, type):
432
+ handler = handler_t_or_handler.New(
433
+ name=name, message_width=message_width, level=level, **kwargs
434
+ )
435
+ else:
436
+ handler = handler_t_or_handler
443
437
  base_t.addHandler(self, handler)
444
438
 
445
439
  path = getattr(handler, "baseFilename", "")
@@ -454,14 +448,16 @@ class logger_t(base_t):
454
448
  """
455
449
  For a print-like calling for print-based debugging.
456
450
  """
451
+ separator = kwargs.get("separator", " ")
452
+
457
453
  frame = e.stack(context=0)[1][0] # 1=caller.
458
454
  details = e.getframeinfo(frame, context=0)
459
- path = path_t(details.filename).relative_to(path_t.home())
460
- where = f"{str(path)[:-3]}.{details.function}.{details.lineno}"
461
-
462
- separator = kwargs.get("separator", " ")
455
+ path = path_t(details.filename)
456
+ if path.is_relative_to(USER_FOLDER):
457
+ path = path.relative_to(USER_FOLDER)
458
+ where = f"{str(path.with_suffix(''))}.{details.function}.{details.lineno}"
463
459
 
464
- self.info(where + "\n" + separator.join(map(str, args)))
460
+ self.info(separator.join(map(str, args)) + f"\n{WHERE_SEPARATOR} " + where)
465
461
 
466
462
  def Log(
467
463
  self,
@@ -516,7 +512,8 @@ class logger_t(base_t):
516
512
  message = text.indent(message, LINE_INDENT)
517
513
 
518
514
  for handler in self.handlers:
519
- handler.LogAsIs(message)
515
+ if (EmitAsIs := getattr(handler, "EmitAsIs", None)) is not None:
516
+ EmitAsIs(message)
520
517
 
521
518
  info_raw = LogAsIs # To follow the convention of the logging methods info, error...
522
519
 
@@ -525,7 +522,8 @@ class logger_t(base_t):
525
522
  ) -> None:
526
523
  """"""
527
524
  for handler in self.handlers:
528
- handler.DisplayRule(text=message, color=color)
525
+ if (EmitRule := getattr(handler, "EmitRule", None)) is not None:
526
+ EmitRule(text=message, color=color)
529
527
 
530
528
  def AddContextLevel(self, new_level: str, /) -> None:
531
529
  """"""
@@ -728,18 +726,4 @@ The fact that you are presently reading this means that you have had
728
726
  knowledge of the CeCILL license and that you accept its terms.
729
727
 
730
728
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
731
-
732
- This software is being developed by Eric Debreuve, a CNRS employee and
733
- member of team Morpheme.
734
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
735
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
736
- I3S, and Laboratory iBV.
737
-
738
- CNRS: https://www.cnrs.fr/index.php/en
739
- Inria: https://www.inria.fr/en/
740
- UniCA: https://univ-cotedazur.eu/
741
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
742
- I3S: https://www.i3s.unice.fr/en/
743
- iBV: http://ibv.unice.fr/
744
- Team Morpheme: https://team.inria.fr/morpheme/
745
729
  """
logger_36/type/loggers.py CHANGED
@@ -1,5 +1,5 @@
1
1
  """
2
- Copyright CNRS/Inria/UniCA
2
+ Copyright CNRS (https://www.cnrs.fr/index.php/en)
3
3
  Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
@@ -8,7 +8,6 @@ import dataclasses as d
8
8
  import logging as l
9
9
  import typing as h
10
10
 
11
- from logger_36.constant.logger import LOGGER_NAME
12
11
  from logger_36.type.logger import logger_t
13
12
 
14
13
 
@@ -21,7 +20,7 @@ class loggers_t(dict[h.Hashable, logger_t]):
21
20
  uid: h.Hashable,
22
21
  /,
23
22
  *,
24
- name: str = LOGGER_NAME,
23
+ name: str | None = None,
25
24
  level: int = l.NOTSET,
26
25
  should_record_messages: bool = False,
27
26
  exit_on_error: bool = False,
@@ -86,18 +85,4 @@ The fact that you are presently reading this means that you have had
86
85
  knowledge of the CeCILL license and that you accept its terms.
87
86
 
88
87
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
89
-
90
- This software is being developed by Eric Debreuve, a CNRS employee and
91
- member of team Morpheme.
92
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
93
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
94
- I3S, and Laboratory iBV.
95
-
96
- CNRS: https://www.cnrs.fr/index.php/en
97
- Inria: https://www.inria.fr/en/
98
- UniCA: https://univ-cotedazur.eu/
99
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
100
- I3S: https://www.i3s.unice.fr/en/
101
- iBV: http://ibv.unice.fr/
102
- Team Morpheme: https://team.inria.fr/morpheme/
103
88
  """
logger_36/version.py CHANGED
@@ -1,10 +1,10 @@
1
1
  """
2
- Copyright CNRS/Inria/UniCA
2
+ Copyright CNRS (https://www.cnrs.fr/index.php/en)
3
3
  Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
6
6
 
7
- __version__ = "2025.17"
7
+ __version__ = "2025.19"
8
8
 
9
9
  """
10
10
  COPYRIGHT NOTICE
@@ -36,18 +36,4 @@ The fact that you are presently reading this means that you have had
36
36
  knowledge of the CeCILL license and that you accept its terms.
37
37
 
38
38
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
39
-
40
- This software is being developed by Eric Debreuve, a CNRS employee and
41
- member of team Morpheme.
42
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
43
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
44
- I3S, and Laboratory iBV.
45
-
46
- CNRS: https://www.cnrs.fr/index.php/en
47
- Inria: https://www.inria.fr/en/
48
- UniCA: https://univ-cotedazur.eu/
49
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
50
- I3S: https://www.i3s.unice.fr/en/
51
- iBV: http://ibv.unice.fr/
52
- Team Morpheme: https://team.inria.fr/morpheme/
53
39
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: logger-36
3
- Version: 2025.17
3
+ Version: 2025.19
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
@@ -29,7 +29,7 @@ Dynamic: requires-python
29
29
  Dynamic: summary
30
30
 
31
31
  ..
32
- Copyright CNRS/Inria/UniCA
32
+ Copyright CNRS (https://www.cnrs.fr/index.php/en)
33
33
  Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
34
34
  SEE COPYRIGHT NOTICE BELOW
35
35
 
@@ -0,0 +1,52 @@
1
+ logger_36/__init__.py,sha256=mK6AD0eWI2Sk42oxleTvsxzYJ28FbHK5WNkpLgAhnNE,2129
2
+ logger_36/version.py,sha256=DefgP6TAlC9ZItUKr6xILYjfpSID0x0a7pe5gfQoQ1s,1680
3
+ logger_36/api/content.py,sha256=DuT4UX4r_1DTXzuuRD-tvsTZk5X-Nj11loBKhuWOMw0,1791
4
+ logger_36/api/gpu.py,sha256=NNs1IvQ7bh8Dppm8O8K2YLWbm4rogc3Ie_-D6xzkX3g,1726
5
+ logger_36/api/memory.py,sha256=vOY4cTTrC3u7L0OrKXdPNlsCahYjCrY4h7iqpGZv9kU,2217
6
+ logger_36/api/storage.py,sha256=RYjn2TD-E1zfNTMgm4b2mbYNVtTwsCUMbuPlMbuvgP0,1774
7
+ logger_36/api/system.py,sha256=h-3GfhZPwawv0UKBWKkT1LzxSCZwpA2VIsy03lLYi6w,1725
8
+ logger_36/api/time.py,sha256=JG0vgzPSRZ7UWQyoihnVu4sjPC-okFIKA3ZyNh2GaZo,1798
9
+ logger_36/api/type.py,sha256=eLZ2yuH-sYeh4Z2KnAwTRJEbmkmgzBPMncdqXfFUTG8,1760
10
+ logger_36/catalog/config/console_rich.py,sha256=t9p9-AkSgPiLAsm1evAdbz77g7JcVLePhUJ1FzNi3cY,2330
11
+ logger_36/catalog/config/optional.py,sha256=5vabOlEQIFxoT_y4AjP19rpOjBuUJplpuBkLoCIKImA,1872
12
+ logger_36/catalog/handler/console.py,sha256=OKtRG3PseT06_UwZBtbragNIKvCqa7ZsLphYEsgeq2c,2308
13
+ logger_36/catalog/handler/console_rich.py,sha256=b3B_pQefv0IeQFEj-tZ5-tH8RrcessZI8sI4Tyf17bg,6180
14
+ logger_36/catalog/handler/file.py,sha256=JReN8KruN8eKhBfG9sj72kkHfukHK4-8mdSxNpgFhLU,2455
15
+ logger_36/catalog/handler/generic.py,sha256=0Z4Vm-AAc92szghYEzihkm9CBRzCvqgdUTXH_p98S4o,6314
16
+ logger_36/catalog/logger/chronos.py,sha256=S4m9TMPQy_Ju500mpE1jNzu2gZG-QKdVuvX9RVRKHR8,1911
17
+ logger_36/catalog/logger/gpu.py,sha256=Py5YY0nD_pqJzJsEKQYoOGHcPqyNVJ3J2noOS3hDL6g,2890
18
+ logger_36/catalog/logger/memory.py,sha256=J0ZGKO7j1FZA_aDGxpABtvzDy1RjCDiDmWYh4U98fEI,4253
19
+ logger_36/catalog/logger/system.py,sha256=b7GnhHTDCQsclMyiZshzjASdk8eJaR7FkwDK-vt6IJg,2539
20
+ logger_36/config/issue.py,sha256=QOkVRPSLZC_2mfcFpad-pcSXJXfLHdWUAXiMbTWlZTg,1741
21
+ logger_36/config/memory.py,sha256=bZmNYsD2goVdkraS1v_t2OqAJo86jKMtP311kIVURDk,1691
22
+ logger_36/config/message.py,sha256=3PvvFNT6tzZu6lOkO3xEoyMFnJonx_CMBDwQAbrXD38,2028
23
+ logger_36/config/system.py,sha256=YRSa2eN_SoTnTXWUXAcpKt4JXifabzMR0eXwjUYlA_A,1951
24
+ logger_36/constant/error.py,sha256=CGisFxb1AWjKbxIKuGqAR7gPKUaD6KkLlY-XmQuIfXg,2301
25
+ logger_36/constant/generic.py,sha256=SQgkQiRcTIjCRvbxiOb6TEm59BC0FNMcjYoIShpcwLo,1718
26
+ logger_36/constant/html.py,sha256=eCp6kumL8bvF30lBjz1iPqw1apzM1rG8rxjNr81aJbA,1989
27
+ logger_36/constant/issue.py,sha256=0EmcsRmSxktFUJR0qOU0PnKG-gfbLDOULH6sSRHFOcc,1789
28
+ logger_36/constant/logger.py,sha256=ZQYX9JiPsoivwRgYNtdEqRKCagSKD88lRqvxP8MX1ZE,1942
29
+ logger_36/constant/memory.py,sha256=Q_E5tTWa-cGaNwrE_xmKa3BxQG6oJO6DHczrxc_M4sE,1817
30
+ logger_36/constant/message.py,sha256=YJOEzdI0ZjUOdHo3CsiS56FVPhrfNoQYvXuUkprH61g,2312
31
+ logger_36/constant/path.py,sha256=OfLh70Jyc8po9Ls34nQh_bRr3PXyQ3kF9ciR9QPhiqI,2213
32
+ logger_36/constant/record.py,sha256=gQCGLxq8Vs789Ty_qaRNKy18mqlyMT_4kyN-T9r_rGE,1734
33
+ logger_36/constant/rule.py,sha256=tBKQgPTt6G_p5eInDdWoEEAvQFz4WMSt5THsS5jvk14,1779
34
+ logger_36/constant/system.py,sha256=pLlLXG5sepQlSUOo3TphaGrHg8xzJBp-GxpL2NPP47k,1904
35
+ logger_36/extension/html_.py,sha256=W9SyiYsaaYHUrHLGAAN2wiJGXUlwOBJ5gzdjmEcnF18,3342
36
+ logger_36/extension/line.py,sha256=joeojQX1bZJM53333mOEU3s-YC5ExGOrN9Cu9Lh5-FU,2617
37
+ logger_36/instance/logger.py,sha256=X_U10RYU1h2Aa70D8hBnmFyJZtRILK16KN-GB4xkHMU,1782
38
+ logger_36/instance/loggers.py,sha256=inBk4KKrQ-z3szaopQ29-qQwh1iSc842sWo5J6zJoiM,1725
39
+ logger_36/task/inspection.py,sha256=ZgPcrPo3h_kEnM-UpHDLg7PAFfB2fqsLFdfmi6hlPVA,4484
40
+ logger_36/task/storage.py,sha256=KAILmJlF5IULxEX9QRCyXCwcalp5mpunWVh1oXuLvSs,3516
41
+ logger_36/task/format/memory.py,sha256=J1Oy3jw8wjSp2kuiRUm_VFpzXOHX2FOc7nuRrCyrskw,3723
42
+ logger_36/task/format/message.py,sha256=Rm6zymVEEGcgKfmxMPXP7q3PtwZJKlXGhqZ5tnvlwxA,3502
43
+ logger_36/task/measure/chronos.py,sha256=7ijMZgP4EP18HbLV2yCxpNpRS9724Wyk523f-nkbhUM,2529
44
+ logger_36/task/measure/memory.py,sha256=kkPHEIUTUhkCOLrAt01eLJLnsnkl0nFPNhFZdIB_JAw,1991
45
+ logger_36/type/handler.py,sha256=LmdiBI1NLzpgI_Mzr6nVBsj9Nu_5iZFGKNKTqGAmdSM,6673
46
+ logger_36/type/issue.py,sha256=QHAYf7QgrjJUtF2D46z6X630qTgeP_0FE5hIwf54RsE,2688
47
+ logger_36/type/logger.py,sha256=oQy5VrJor6aJYH3KMIRMpbWx9YoR9oWFeSZWYzle2n4,26041
48
+ logger_36/type/loggers.py,sha256=7EX7Sg_RlduBjdfFlNZmUfNeDloH1xU30Rdkg_-rXh8,3172
49
+ logger_36-2025.19.dist-info/METADATA,sha256=o3JDxhFujB13yngrFl9lTrpRoSvLYMev6u9pY06nB_E,6529
50
+ logger_36-2025.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
51
+ logger_36-2025.19.dist-info/top_level.txt,sha256=sM95BTMWmslEEgR_1pzwZsOeSp8C_QBiu8ImbFr0XLc,10
52
+ logger_36-2025.19.dist-info/RECORD,,
@@ -1,77 +0,0 @@
1
- """
2
- Copyright CNRS/Inria/UniCA
3
- Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
- SEE COPYRIGHT NOTICE BELOW
5
- """
6
-
7
- from logger_36.catalog.config.optional import RICH_IS_AVAILABLE
8
-
9
-
10
- def RuleAsText(text: str | None, _: None, /) -> str:
11
- """"""
12
- if text is None:
13
- return "---- ---- ---- ---- ---- ---- ---- ---- ----"
14
- else:
15
- return f"---- ---- ---- ---- {text} ---- ---- ---- ----"
16
-
17
-
18
- if RICH_IS_AVAILABLE:
19
- from rich.rule import Rule as rule_t # noqa
20
- from rich.text import Text as text_t # noqa
21
-
22
- def Rule(text: str | None, color: str, /) -> rule_t | str:
23
- """"""
24
- if text is None:
25
- return rule_t(style=color)
26
- else:
27
- return rule_t(title=text_t(text, style=f"bold {color}"), style=color)
28
-
29
- else:
30
- rule_t = text_t = None
31
- Rule = lambda _, __: RuleAsText(_, None)
32
-
33
- """
34
- COPYRIGHT NOTICE
35
-
36
- This software is governed by the CeCILL license under French law and
37
- abiding by the rules of distribution of free software. You can use,
38
- modify and/ or redistribute the software under the terms of the CeCILL
39
- license as circulated by CEA, CNRS and INRIA at the following URL
40
- "http://www.cecill.info".
41
-
42
- As a counterpart to the access to the source code and rights to copy,
43
- modify and redistribute granted by the license, users are provided only
44
- with a limited warranty and the software's author, the holder of the
45
- economic rights, and the successive licensors have only limited
46
- liability.
47
-
48
- In this respect, the user's attention is drawn to the risks associated
49
- with loading, using, modifying and/or developing or reproducing the
50
- software by the user in light of its specific status of free software,
51
- that may mean that it is complicated to manipulate, and that also
52
- therefore means that it is reserved for developers and experienced
53
- professionals having in-depth computer knowledge. Users are therefore
54
- encouraged to load and test the software's suitability as regards their
55
- requirements in conditions enabling the security of their systems and/or
56
- data to be ensured and, more generally, to use and operate it in the
57
- same conditions as regards security.
58
-
59
- The fact that you are presently reading this means that you have had
60
- knowledge of the CeCILL license and that you accept its terms.
61
-
62
- SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
63
-
64
- This software is being developed by Eric Debreuve, a CNRS employee and
65
- member of team Morpheme.
66
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
67
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
68
- I3S, and Laboratory iBV.
69
-
70
- CNRS: https://www.cnrs.fr/index.php/en
71
- Inria: https://www.inria.fr/en/
72
- UniCA: https://univ-cotedazur.eu/
73
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
74
- I3S: https://www.i3s.unice.fr/en/
75
- iBV: http://ibv.unice.fr/
76
- Team Morpheme: https://team.inria.fr/morpheme/
77
- """
logger_36/type/message.py DELETED
@@ -1,90 +0,0 @@
1
- """
2
- Copyright CNRS/Inria/UniCA
3
- Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
- SEE COPYRIGHT NOTICE BELOW
5
- """
6
-
7
- import logging as l
8
- import typing as h
9
-
10
- from logger_36.catalog.config.optional import RICH_IS_AVAILABLE
11
-
12
-
13
- @h.runtime_checkable
14
- class _RuleAsText_p(h.Protocol):
15
- def __call__(self, text: str | None, color: None, /) -> str: ...
16
-
17
-
18
- if RICH_IS_AVAILABLE:
19
- from rich.rule import Rule as rule_t # noqa
20
-
21
- @h.runtime_checkable
22
- class _Rule_p(h.Protocol):
23
- def __call__(self, text: str | None, color: str, /) -> rule_t | str: ...
24
- else:
25
- _Rule_p = None
26
-
27
- RuleWithText_h = _RuleAsText_p | _Rule_p
28
-
29
-
30
- @h.runtime_checkable
31
- class _MessageFromRecordPreprocessed_p(h.Protocol):
32
- def __call__(
33
- self,
34
- record: l.LogRecord,
35
- RuleWithText: RuleWithText_h,
36
- /,
37
- *,
38
- line_width: int = 0,
39
- PreProcessed: h.Callable[[str], str] | None = None,
40
- ) -> tuple[str, bool]: ...
41
-
42
-
43
- MessageFromRecord_h = _MessageFromRecordPreprocessed_p
44
-
45
-
46
- """
47
- COPYRIGHT NOTICE
48
-
49
- This software is governed by the CeCILL license under French law and
50
- abiding by the rules of distribution of free software. You can use,
51
- modify and/ or redistribute the software under the terms of the CeCILL
52
- license as circulated by CEA, CNRS and INRIA at the following URL
53
- "http://www.cecill.info".
54
-
55
- As a counterpart to the access to the source code and rights to copy,
56
- modify and redistribute granted by the license, users are provided only
57
- with a limited warranty and the software's author, the holder of the
58
- economic rights, and the successive licensors have only limited
59
- liability.
60
-
61
- In this respect, the user's attention is drawn to the risks associated
62
- with loading, using, modifying and/or developing or reproducing the
63
- software by the user in light of its specific status of free software,
64
- that may mean that it is complicated to manipulate, and that also
65
- therefore means that it is reserved for developers and experienced
66
- professionals having in-depth computer knowledge. Users are therefore
67
- encouraged to load and test the software's suitability as regards their
68
- requirements in conditions enabling the security of their systems and/or
69
- data to be ensured and, more generally, to use and operate it in the
70
- same conditions as regards security.
71
-
72
- The fact that you are presently reading this means that you have had
73
- knowledge of the CeCILL license and that you accept its terms.
74
-
75
- SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
76
-
77
- This software is being developed by Eric Debreuve, a CNRS employee and
78
- member of team Morpheme.
79
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
80
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
81
- I3S, and Laboratory iBV.
82
-
83
- CNRS: https://www.cnrs.fr/index.php/en
84
- Inria: https://www.inria.fr/en/
85
- UniCA: https://univ-cotedazur.eu/
86
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
87
- I3S: https://www.i3s.unice.fr/en/
88
- iBV: http://ibv.unice.fr/
89
- Team Morpheme: https://team.inria.fr/morpheme/
90
- """