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/__init__.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
  """
@@ -53,18 +53,4 @@ The fact that you are presently reading this means that you have had
53
53
  knowledge of the CeCILL license and that you accept its terms.
54
54
 
55
55
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
56
-
57
- This software is being developed by Eric Debreuve, a CNRS employee and
58
- member of team Morpheme.
59
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
60
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
61
- I3S, and Laboratory iBV.
62
-
63
- CNRS: https://www.cnrs.fr/index.php/en
64
- Inria: https://www.inria.fr/en/
65
- UniCA: https://univ-cotedazur.eu/
66
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
67
- I3S: https://www.i3s.unice.fr/en/
68
- iBV: http://ibv.unice.fr/
69
- Team Morpheme: https://team.inria.fr/morpheme/
70
56
  """
logger_36/api/content.py CHANGED
@@ -1,12 +1,11 @@
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
7
  from logger_36.constant.message import LINE_INDENT # noqa
8
8
  from logger_36.task.format.message import MessageWithActualExpected # noqa
9
- from logger_36.task.format.rule import Rule, RuleAsText # noqa
10
9
 
11
10
  """
12
11
  COPYRIGHT NOTICE
@@ -38,18 +37,4 @@ The fact that you are presently reading this means that you have had
38
37
  knowledge of the CeCILL license and that you accept its terms.
39
38
 
40
39
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
41
-
42
- This software is being developed by Eric Debreuve, a CNRS employee and
43
- member of team Morpheme.
44
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
45
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
46
- I3S, and Laboratory iBV.
47
-
48
- CNRS: https://www.cnrs.fr/index.php/en
49
- Inria: https://www.inria.fr/en/
50
- UniCA: https://univ-cotedazur.eu/
51
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
52
- I3S: https://www.i3s.unice.fr/en/
53
- iBV: http://ibv.unice.fr/
54
- Team Morpheme: https://team.inria.fr/morpheme/
55
40
  """
logger_36/api/gpu.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
  """
@@ -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
  """
logger_36/api/memory.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
  """
@@ -46,18 +46,4 @@ The fact that you are presently reading this means that you have had
46
46
  knowledge of the CeCILL license and that you accept its terms.
47
47
 
48
48
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
49
-
50
- This software is being developed by Eric Debreuve, a CNRS employee and
51
- member of team Morpheme.
52
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
53
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
54
- I3S, and Laboratory iBV.
55
-
56
- CNRS: https://www.cnrs.fr/index.php/en
57
- Inria: https://www.inria.fr/en/
58
- UniCA: https://univ-cotedazur.eu/
59
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
60
- I3S: https://www.i3s.unice.fr/en/
61
- iBV: http://ibv.unice.fr/
62
- Team Morpheme: https://team.inria.fr/morpheme/
63
49
  """
logger_36/api/storage.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
  """
@@ -37,18 +37,4 @@ The fact that you are presently reading this means that you have had
37
37
  knowledge of the CeCILL license and that you accept its terms.
38
38
 
39
39
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
40
-
41
- This software is being developed by Eric Debreuve, a CNRS employee and
42
- member of team Morpheme.
43
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
44
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
45
- I3S, and Laboratory iBV.
46
-
47
- CNRS: https://www.cnrs.fr/index.php/en
48
- Inria: https://www.inria.fr/en/
49
- UniCA: https://univ-cotedazur.eu/
50
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
51
- I3S: https://www.i3s.unice.fr/en/
52
- iBV: http://ibv.unice.fr/
53
- Team Morpheme: https://team.inria.fr/morpheme/
54
40
  """
logger_36/api/system.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
  """
@@ -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
  """
logger_36/api/time.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
  """
@@ -37,18 +37,4 @@ The fact that you are presently reading this means that you have had
37
37
  knowledge of the CeCILL license and that you accept its terms.
38
38
 
39
39
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
40
-
41
- This software is being developed by Eric Debreuve, a CNRS employee and
42
- member of team Morpheme.
43
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
44
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
45
- I3S, and Laboratory iBV.
46
-
47
- CNRS: https://www.cnrs.fr/index.php/en
48
- Inria: https://www.inria.fr/en/
49
- UniCA: https://univ-cotedazur.eu/
50
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
51
- I3S: https://www.i3s.unice.fr/en/
52
- iBV: http://ibv.unice.fr/
53
- Team Morpheme: https://team.inria.fr/morpheme/
54
40
  """
logger_36/api/type.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
  """
@@ -37,18 +37,4 @@ The fact that you are presently reading this means that you have had
37
37
  knowledge of the CeCILL license and that you accept its terms.
38
38
 
39
39
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
40
-
41
- This software is being developed by Eric Debreuve, a CNRS employee and
42
- member of team Morpheme.
43
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
44
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
45
- I3S, and Laboratory iBV.
46
-
47
- CNRS: https://www.cnrs.fr/index.php/en
48
- Inria: https://www.inria.fr/en/
49
- UniCA: https://univ-cotedazur.eu/
50
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
51
- I3S: https://www.i3s.unice.fr/en/
52
- iBV: http://ibv.unice.fr/
53
- Team Morpheme: https://team.inria.fr/morpheme/
54
40
  """
@@ -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
  """
@@ -24,7 +24,7 @@ LEVEL_COLOR: dict[int, str | style_t] = {
24
24
  }
25
25
  ACTUAL_COLOR = LEVEL_COLOR[l.CRITICAL]
26
26
  EXPECTED_COLOR = "green3"
27
- DATE_TIME_COLOR = "sky_blue3"
27
+ RULE_COLOR = "sky_blue3"
28
28
 
29
29
  ALTERNATIVE_BACKGROUND_FOR_LIGHT = style_t(bgcolor=color_t.from_rgb(230, 230, 230))
30
30
  ALTERNATIVE_BACKGROUND_FOR_DARK = style_t(bgcolor=color_t.from_rgb(25, 25, 25))
@@ -59,18 +59,4 @@ The fact that you are presently reading this means that you have had
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/
76
62
  """
@@ -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
  """
@@ -43,18 +43,4 @@ The fact that you are presently reading this means that you have had
43
43
  knowledge of the CeCILL license and that you accept its terms.
44
44
 
45
45
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
46
-
47
- This software is being developed by Eric Debreuve, a CNRS employee and
48
- member of team Morpheme.
49
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
50
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
51
- I3S, and Laboratory iBV.
52
-
53
- CNRS: https://www.cnrs.fr/index.php/en
54
- Inria: https://www.inria.fr/en/
55
- UniCA: https://univ-cotedazur.eu/
56
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
57
- I3S: https://www.i3s.unice.fr/en/
58
- iBV: http://ibv.unice.fr/
59
- Team Morpheme: https://team.inria.fr/morpheme/
60
46
  """
@@ -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,13 +8,10 @@ import logging as l
8
8
  import sys as s
9
9
  import typing as h
10
10
 
11
- from logger_36.task.format.rule import RuleAsText
12
11
  from logger_36.type.handler import handler_t as base_t
13
12
 
14
13
 
15
14
  class console_handler_t(base_t):
16
- kind: h.ClassVar[str] = "c"
17
-
18
15
  @classmethod
19
16
  def New(
20
17
  cls,
@@ -23,18 +20,18 @@ class console_handler_t(base_t):
23
20
  name: str | None = None,
24
21
  message_width: int = -1,
25
22
  level: int = l.NOTSET,
26
- formatter: l.Formatter | None = None,
27
23
  **_,
28
24
  ) -> h.Self:
29
25
  """"""
30
- return cls(name, message_width, level, formatter)
26
+ return cls(name, message_width, None, level)
31
27
 
32
28
  def emit(self, record: l.LogRecord, /) -> None:
33
29
  """"""
34
- message = self.MessageFromRecord(
35
- record, RuleAsText, line_width=self.message_width
36
- )
37
- s.__stdout__.write(message[0] + "\n")
30
+ s.__stdout__.write(self.MessageFromRecord(record)[0] + "\n")
31
+
32
+ def EmitAsIs(self, message: str, /) -> None:
33
+ """"""
34
+ s.__stdout__.write(message + "\n")
38
35
 
39
36
 
40
37
  """
@@ -67,18 +64,4 @@ The fact that you are presently reading this means that you have had
67
64
  knowledge of the CeCILL license and that you accept its terms.
68
65
 
69
66
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
70
-
71
- This software is being developed by Eric Debreuve, a CNRS employee and
72
- member of team Morpheme.
73
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
74
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
75
- I3S, and Laboratory iBV.
76
-
77
- CNRS: https://www.cnrs.fr/index.php/en
78
- Inria: https://www.inria.fr/en/
79
- UniCA: https://univ-cotedazur.eu/
80
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
81
- I3S: https://www.i3s.unice.fr/en/
82
- iBV: http://ibv.unice.fr/
83
- Team Morpheme: https://team.inria.fr/morpheme/
84
67
  """
@@ -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
  """
@@ -10,6 +10,7 @@ import typing as h
10
10
  from rich.console import Console as console_t # noqa
11
11
  from rich.console import RenderableType as renderable_t # noqa
12
12
  from rich.markup import escape as EscapedVersion # noqa
13
+ from rich.rule import Rule as rule_t # noqa
13
14
  from rich.text import Text as text_t # noqa
14
15
  from rich.traceback import install as InstallTracebackHandler # noqa
15
16
 
@@ -17,15 +18,14 @@ from logger_36.catalog.config.console_rich import (
17
18
  ACTUAL_COLOR,
18
19
  ALTERNATIVE_BACKGROUND_FOR_DARK,
19
20
  ALTERNATIVE_BACKGROUND_FOR_LIGHT,
20
- DATE_TIME_COLOR,
21
21
  EXPECTED_COLOR,
22
22
  GRAY_COLOR,
23
23
  LEVEL_COLOR,
24
+ RULE_COLOR,
24
25
  WHITE_COLOR,
25
26
  )
26
27
  from logger_36.config.message import ACTUAL_PATTERNS, EXPECTED_PATTERNS, WHERE_SEPARATOR
27
28
  from logger_36.constant.message import CONTEXT_LENGTH
28
- from logger_36.task.format.rule import Rule
29
29
  from logger_36.type.handler import handler_t as base_t
30
30
 
31
31
  _COMMON_TRACEBACK_ARGUMENTS = ("theme", "width")
@@ -50,15 +50,8 @@ class console_rich_handler_t(base_t):
50
50
  - 2: enabled for light background
51
51
  """
52
52
 
53
- kind: h.ClassVar[str] = "c"
54
-
55
53
  def __init__(
56
- self,
57
- name: str | None,
58
- message_width: int,
59
- level: int,
60
- formatter: l.Formatter | None,
61
- kwargs,
54
+ self, name: str | None, message_width: int, level: int, kwargs
62
55
  ) -> None:
63
56
  """"""
64
57
  alternating_logs = kwargs.pop("alternating_logs", 0)
@@ -66,7 +59,7 @@ class console_rich_handler_t(base_t):
66
59
 
67
60
  assert alternating_logs in (0, 1, 2)
68
61
 
69
- base_t.__init__(self, name, message_width, level, formatter, kwargs)
62
+ base_t.__init__(self, name, message_width, EscapedVersion, level, kwargs)
70
63
 
71
64
  self.console = None # console_t | None.
72
65
  self.alternating_logs = alternating_logs
@@ -98,21 +91,20 @@ class console_rich_handler_t(base_t):
98
91
  name: str | None = None,
99
92
  message_width: int = -1,
100
93
  level: int = l.NOTSET,
101
- formatter: l.Formatter | None = None,
102
94
  **kwargs,
103
95
  ) -> h.Self:
104
96
  """"""
105
- return cls(name, message_width, level, formatter, kwargs)
97
+ return cls(name, message_width, level, kwargs)
98
+
99
+ def Rule(self, text: str | None, /, *, color: str = "black") -> str | rule_t:
100
+ """"""
101
+ if text is None:
102
+ return rule_t(style=color)
103
+ return rule_t(title=text_t(text, style=f"bold {color}"), style=color)
106
104
 
107
105
  def emit(self, record: l.LogRecord, /) -> None:
108
106
  """"""
109
- message, is_not_a_rule = self.MessageFromRecord(
110
- record,
111
- Rule,
112
- line_width=self.message_width,
113
- color=DATE_TIME_COLOR,
114
- PreProcessed=EscapedVersion,
115
- )
107
+ message, is_not_a_rule = self.MessageFromRecord(record, rule_color=RULE_COLOR)
116
108
  if is_not_a_rule:
117
109
  message = HighlightedVersion(
118
110
  self.console,
@@ -124,14 +116,10 @@ class console_rich_handler_t(base_t):
124
116
  self.console.print(message, crop=False, overflow="ignore")
125
117
  self._log_parity = not self._log_parity
126
118
 
127
- def LogAsIs(self, message: str | renderable_t, /) -> None:
119
+ def EmitAsIs(self, message: str | renderable_t, /) -> None:
128
120
  """"""
129
121
  self.console.print(message, crop=False, overflow="ignore")
130
122
 
131
- def DisplayRule(self, /, *, text: str | None = None, color: str = "black") -> None:
132
- """"""
133
- self.LogAsIs(Rule(text, color))
134
-
135
123
 
136
124
  def HighlightedVersion(
137
125
  _: console_t,
@@ -191,18 +179,4 @@ The fact that you are presently reading this means that you have had
191
179
  knowledge of the CeCILL license and that you accept its terms.
192
180
 
193
181
  SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
194
-
195
- This software is being developed by Eric Debreuve, a CNRS employee and
196
- member of team Morpheme.
197
- Team Morpheme is a joint team between Inria, CNRS, and UniCA.
198
- It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
199
- I3S, and Laboratory iBV.
200
-
201
- CNRS: https://www.cnrs.fr/index.php/en
202
- Inria: https://www.inria.fr/en/
203
- UniCA: https://univ-cotedazur.eu/
204
- Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
205
- I3S: https://www.i3s.unice.fr/en/
206
- iBV: http://ibv.unice.fr/
207
- Team Morpheme: https://team.inria.fr/morpheme/
208
182
  """
@@ -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,13 +8,10 @@ import logging as l
8
8
  import typing as h
9
9
  from pathlib import Path as path_t
10
10
 
11
- from logger_36.task.format.rule import RuleAsText
12
11
  from logger_36.type.handler import file_handler_t as base_t
13
12
 
14
13
 
15
14
  class file_handler_t(base_t):
16
- kind: h.ClassVar[str] = "f"
17
-
18
15
  @classmethod
19
16
  def New(
20
17
  cls,
@@ -23,22 +20,19 @@ class file_handler_t(base_t):
23
20
  name: str | None = None,
24
21
  message_width: int = -1,
25
22
  level: int = l.NOTSET,
26
- formatter: l.Formatter | None = None,
27
23
  path: str | path_t | None = None,
28
24
  **_,
29
25
  ) -> h.Self:
30
26
  """"""
31
- return cls(name, message_width, level, formatter, path)
27
+ return cls(name, message_width, None, level, path)
32
28
 
33
29
  def emit(self, record: l.LogRecord, /) -> None:
34
30
  """"""
35
- message = self.MessageFromRecord(
36
- record, RuleAsText, line_width=self.message_width
37
- )
38
- self.stream.write(message[0] + "\n")
31
+ output = self.MessageFromRecord(record)
32
+ self.stream.write(output[0] + "\n")
39
33
  self.stream.flush()
40
34
 
41
- def LogAsIs(self, message: str, /) -> None:
35
+ def EmitAsIs(self, message: str, /) -> None:
42
36
  """"""
43
37
  self.stream.write(message + "\n")
44
38
  self.stream.flush()
@@ -74,18 +68,4 @@ The fact that you are presently reading this means that you have had
74
68
  knowledge of the CeCILL license and that you accept its terms.
75
69
 
76
70
  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
71
  """