logger-36 2024.15__py3-none-any.whl → 2024.17__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 (45) hide show
  1. logger_36/__init__.py +54 -32
  2. logger_36/catalog/config/console_rich.py +58 -37
  3. logger_36/catalog/handler/console.py +64 -42
  4. logger_36/catalog/handler/console_rich.py +67 -45
  5. logger_36/catalog/handler/file.py +67 -45
  6. logger_36/catalog/handler/generic.py +72 -51
  7. logger_36/catalog/logging/chronos.py +56 -33
  8. logger_36/catalog/logging/exception.py +74 -0
  9. logger_36/catalog/logging/gpu.py +56 -33
  10. logger_36/catalog/logging/memory.py +66 -39
  11. logger_36/catalog/logging/system.py +56 -32
  12. logger_36/config/issue.py +51 -30
  13. logger_36/config/memory.py +51 -30
  14. logger_36/config/message.py +51 -30
  15. logger_36/config/system.py +51 -30
  16. logger_36/constant/error.py +51 -30
  17. logger_36/constant/generic.py +51 -30
  18. logger_36/constant/handler.py +51 -30
  19. logger_36/constant/issue.py +51 -30
  20. logger_36/constant/logger.py +51 -30
  21. logger_36/constant/memory.py +51 -30
  22. logger_36/constant/message.py +51 -30
  23. logger_36/constant/record.py +51 -30
  24. logger_36/constant/system.py +51 -30
  25. logger_36/instance/logger.py +55 -0
  26. logger_36/instance/loggers.py +56 -0
  27. logger_36/main.py +61 -33
  28. logger_36/task/format/memory.py +52 -30
  29. logger_36/task/format/message.py +52 -30
  30. logger_36/task/format/rule.py +51 -30
  31. logger_36/task/inspection.py +52 -30
  32. logger_36/task/measure/chronos.py +52 -30
  33. logger_36/task/measure/memory.py +52 -30
  34. logger_36/task/storage.py +60 -38
  35. logger_36/type/{extension.py → handler.py} +59 -37
  36. logger_36/type/issue.py +52 -30
  37. logger_36/type/logger.py +70 -51
  38. logger_36/type/loggers.py +78 -0
  39. logger_36/version.py +53 -32
  40. {logger_36-2024.15.dist-info → logger_36-2024.17.dist-info}/METADATA +50 -32
  41. logger_36-2024.17.dist-info/RECORD +43 -0
  42. {logger_36-2024.15.dist-info → logger_36-2024.17.dist-info}/WHEEL +1 -1
  43. logger_36/instance.py +0 -34
  44. logger_36-2024.15.dist-info/RECORD +0 -40
  45. {logger_36-2024.15.dist-info → logger_36-2024.17.dist-info}/top_level.txt +0 -0
logger_36/__init__.py CHANGED
@@ -1,35 +1,10 @@
1
- # Copyright CNRS/Inria/UniCA
2
- # Contributor(s): Eric Debreuve (since 2023)
3
- #
4
- # eric.debreuve@cnrs.fr
5
- #
6
- # This software is governed by the CeCILL license under French law and
7
- # abiding by the rules of distribution of free software. You can use,
8
- # modify and/ or redistribute the software under the terms of the CeCILL
9
- # license as circulated by CEA, CNRS and INRIA at the following URL
10
- # "http://www.cecill.info".
11
- #
12
- # As a counterpart to the access to the source code and rights to copy,
13
- # modify and redistribute granted by the license, users are provided only
14
- # with a limited warranty and the software's author, the holder of the
15
- # economic rights, and the successive licensors have only limited
16
- # liability.
17
- #
18
- # In this respect, the user's attention is drawn to the risks associated
19
- # with loading, using, modifying and/or developing or reproducing the
20
- # software by the user in light of its specific status of free software,
21
- # that may mean that it is complicated to manipulate, and that also
22
- # therefore means that it is reserved for developers and experienced
23
- # professionals having in-depth computer knowledge. Users are therefore
24
- # encouraged to load and test the software's suitability as regards their
25
- # requirements in conditions enabling the security of their systems and/or
26
- # data to be ensured and, more generally, to use and operate it in the
27
- # same conditions as regards security.
28
- #
29
- # The fact that you are presently reading this means that you have had
30
- # knowledge of the CeCILL license and that you accept its terms.
31
-
32
- from logger_36.instance import LOGGER
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.instance.logger import LOGGER
33
8
  from logger_36.main import (
34
9
  AddConsoleHandler,
35
10
  AddFileHandler,
@@ -37,4 +12,51 @@ from logger_36.main import (
37
12
  AddRichConsoleHandler,
38
13
  )
39
14
  from logger_36.task.format.message import FormattedMessage
15
+ from logger_36.type.logger import logger_t
40
16
  from logger_36.version import __version__
17
+
18
+ """
19
+ COPYRIGHT NOTICE
20
+
21
+ This software is governed by the CeCILL license under French law and
22
+ abiding by the rules of distribution of free software. You can use,
23
+ modify and/ or redistribute the software under the terms of the CeCILL
24
+ license as circulated by CEA, CNRS and INRIA at the following URL
25
+ "http://www.cecill.info".
26
+
27
+ As a counterpart to the access to the source code and rights to copy,
28
+ modify and redistribute granted by the license, users are provided only
29
+ with a limited warranty and the software's author, the holder of the
30
+ economic rights, and the successive licensors have only limited
31
+ liability.
32
+
33
+ In this respect, the user's attention is drawn to the risks associated
34
+ with loading, using, modifying and/or developing or reproducing the
35
+ software by the user in light of its specific status of free software,
36
+ that may mean that it is complicated to manipulate, and that also
37
+ therefore means that it is reserved for developers and experienced
38
+ professionals having in-depth computer knowledge. Users are therefore
39
+ encouraged to load and test the software's suitability as regards their
40
+ requirements in conditions enabling the security of their systems and/or
41
+ data to be ensured and, more generally, to use and operate it in the
42
+ same conditions as regards security.
43
+
44
+ The fact that you are presently reading this means that you have had
45
+ knowledge of the CeCILL license and that you accept its terms.
46
+
47
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
48
+
49
+ This software is being developed by Eric Debreuve, a CNRS employee and
50
+ member of team Morpheme.
51
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
52
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
53
+ I3S, and Laboratory iBV.
54
+
55
+ CNRS: https://www.cnrs.fr/index.php/en
56
+ Inria: https://www.inria.fr/en/
57
+ UniCA: https://univ-cotedazur.eu/
58
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
59
+ I3S: https://www.i3s.unice.fr/en/
60
+ iBV: http://ibv.unice.fr/
61
+ Team Morpheme: https://team.inria.fr/morpheme/
62
+ """
@@ -1,43 +1,18 @@
1
- # Copyright CNRS/Inria/UniCA
2
- # Contributor(s): Eric Debreuve (since 2023)
3
- #
4
- # eric.debreuve@cnrs.fr
5
- #
6
- # This software is governed by the CeCILL license under French law and
7
- # abiding by the rules of distribution of free software. You can use,
8
- # modify and/ or redistribute the software under the terms of the CeCILL
9
- # license as circulated by CEA, CNRS and INRIA at the following URL
10
- # "http://www.cecill.info".
11
- #
12
- # As a counterpart to the access to the source code and rights to copy,
13
- # modify and redistribute granted by the license, users are provided only
14
- # with a limited warranty and the software's author, the holder of the
15
- # economic rights, and the successive licensors have only limited
16
- # liability.
17
- #
18
- # In this respect, the user's attention is drawn to the risks associated
19
- # with loading, using, modifying and/or developing or reproducing the
20
- # software by the user in light of its specific status of free software,
21
- # that may mean that it is complicated to manipulate, and that also
22
- # therefore means that it is reserved for developers and experienced
23
- # professionals having in-depth computer knowledge. Users are therefore
24
- # encouraged to load and test the software's suitability as regards their
25
- # requirements in conditions enabling the security of their systems and/or
26
- # data to be ensured and, more generally, to use and operate it in the
27
- # same conditions as regards security.
28
- #
29
- # The fact that you are presently reading this means that you have had
30
- # knowledge of the CeCILL license and that you accept its terms.
31
-
32
1
  """
33
- Colors: See https://rich.readthedocs.io/en/stable/appendix/colors.html.
2
+ Copyright CNRS/Inria/UniCA
3
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
+ SEE COPYRIGHT NOTICE BELOW
34
5
  """
6
+
35
7
  import logging as lggg
36
8
 
37
9
  from rich.color import Color as color_t
38
10
  from rich.style import Style as style_t
39
11
 
40
- DATE_TIME_COLOR: str = "dodger_blue2"
12
+ """
13
+ Colors: See https://rich.readthedocs.io/en/stable/appendix/colors.html.
14
+ """
15
+ DATE_TIME_COLOR = "dodger_blue2"
41
16
  LEVEL_COLOR: dict[int, str | style_t] = {
42
17
  lggg.DEBUG: "orchid",
43
18
  lggg.INFO: "white",
@@ -45,8 +20,54 @@ LEVEL_COLOR: dict[int, str | style_t] = {
45
20
  lggg.ERROR: "orange1",
46
21
  lggg.CRITICAL: "red",
47
22
  }
48
- ACTUAL_COLOR: str = "indian_red"
49
- EXPECTED_COLOR: str = "green"
50
- ELAPSED_TIME_COLOR: str = "green"
23
+ ACTUAL_COLOR = "indian_red"
24
+ EXPECTED_COLOR = "green"
25
+ ELAPSED_TIME_COLOR = "green"
26
+
27
+ GRAY_STYLE = style_t(color=color_t.from_rgb(150, 150, 150))
28
+
29
+ """
30
+ COPYRIGHT NOTICE
31
+
32
+ This software is governed by the CeCILL license under French law and
33
+ abiding by the rules of distribution of free software. You can use,
34
+ modify and/ or redistribute the software under the terms of the CeCILL
35
+ license as circulated by CEA, CNRS and INRIA at the following URL
36
+ "http://www.cecill.info".
37
+
38
+ As a counterpart to the access to the source code and rights to copy,
39
+ modify and redistribute granted by the license, users are provided only
40
+ with a limited warranty and the software's author, the holder of the
41
+ economic rights, and the successive licensors have only limited
42
+ liability.
43
+
44
+ In this respect, the user's attention is drawn to the risks associated
45
+ with loading, using, modifying and/or developing or reproducing the
46
+ software by the user in light of its specific status of free software,
47
+ that may mean that it is complicated to manipulate, and that also
48
+ therefore means that it is reserved for developers and experienced
49
+ professionals having in-depth computer knowledge. Users are therefore
50
+ encouraged to load and test the software's suitability as regards their
51
+ requirements in conditions enabling the security of their systems and/or
52
+ data to be ensured and, more generally, to use and operate it in the
53
+ same conditions as regards security.
51
54
 
52
- GRAY_STYLE: style_t = style_t(color=color_t.from_rgb(150, 150, 150))
55
+ The fact that you are presently reading this means that you have had
56
+ knowledge of the CeCILL license and that you accept its terms.
57
+
58
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
59
+
60
+ This software is being developed by Eric Debreuve, a CNRS employee and
61
+ member of team Morpheme.
62
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
63
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
64
+ I3S, and Laboratory iBV.
65
+
66
+ CNRS: https://www.cnrs.fr/index.php/en
67
+ Inria: https://www.inria.fr/en/
68
+ UniCA: https://univ-cotedazur.eu/
69
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
70
+ I3S: https://www.i3s.unice.fr/en/
71
+ iBV: http://ibv.unice.fr/
72
+ Team Morpheme: https://team.inria.fr/morpheme/
73
+ """
@@ -1,54 +1,29 @@
1
- # Copyright CNRS/Inria/UniCA
2
- # Contributor(s): Eric Debreuve (since 2023)
3
- #
4
- # eric.debreuve@cnrs.fr
5
- #
6
- # This software is governed by the CeCILL license under French law and
7
- # abiding by the rules of distribution of free software. You can use,
8
- # modify and/ or redistribute the software under the terms of the CeCILL
9
- # license as circulated by CEA, CNRS and INRIA at the following URL
10
- # "http://www.cecill.info".
11
- #
12
- # As a counterpart to the access to the source code and rights to copy,
13
- # modify and redistribute granted by the license, users are provided only
14
- # with a limited warranty and the software's author, the holder of the
15
- # economic rights, and the successive licensors have only limited
16
- # liability.
17
- #
18
- # In this respect, the user's attention is drawn to the risks associated
19
- # with loading, using, modifying and/or developing or reproducing the
20
- # software by the user in light of its specific status of free software,
21
- # that may mean that it is complicated to manipulate, and that also
22
- # therefore means that it is reserved for developers and experienced
23
- # professionals having in-depth computer knowledge. Users are therefore
24
- # encouraged to load and test the software's suitability as regards their
25
- # requirements in conditions enabling the security of their systems and/or
26
- # data to be ensured and, more generally, to use and operate it in the
27
- # same conditions as regards security.
28
- #
29
- # The fact that you are presently reading this means that you have had
30
- # knowledge of the CeCILL license and that you accept its terms.
31
-
32
- import dataclasses as dtcl
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 dataclasses as d
33
8
  import logging as lggg
34
9
  import typing as h
35
10
 
36
11
  from logger_36.constant.record import SHOW_W_RULE_ATTR
37
12
  from logger_36.task.format.rule import RuleAsText
38
- from logger_36.type.extension import handler_extension_t
13
+ from logger_36.type.handler import handler_extension_t
39
14
 
40
15
 
41
- @dtcl.dataclass(slots=True, repr=False, eq=False)
16
+ @d.dataclass(slots=True, repr=False, eq=False)
42
17
  class console_handler_t(lggg.Handler):
43
- extension: handler_extension_t = dtcl.field(init=False)
44
- FormattedLines: h.Callable[..., tuple[str, str | None]] = dtcl.field(init=False)
18
+ extension: handler_extension_t = d.field(init=False)
19
+ FormattedLines: h.Callable[..., tuple[str, str | None]] = d.field(init=False)
45
20
 
46
- name: dtcl.InitVar[str | None] = None
47
- level: dtcl.InitVar[int] = lggg.NOTSET
48
- show_where: dtcl.InitVar[bool] = True
49
- show_memory_usage: dtcl.InitVar[bool] = False
50
- message_width: dtcl.InitVar[int] = -1
51
- formatter: dtcl.InitVar[lggg.Formatter | None] = None
21
+ name: d.InitVar[str | None] = None
22
+ level: d.InitVar[int] = lggg.NOTSET
23
+ show_where: d.InitVar[bool] = True
24
+ show_memory_usage: d.InitVar[bool] = False
25
+ message_width: d.InitVar[int] = -1
26
+ formatter: d.InitVar[lggg.Formatter | None] = None
52
27
 
53
28
  def __post_init__(
54
29
  self,
@@ -85,3 +60,50 @@ class console_handler_t(lggg.Handler):
85
60
  def ShowMessage(self, message: str, /) -> None:
86
61
  """"""
87
62
  print(message)
63
+
64
+
65
+ """
66
+ COPYRIGHT NOTICE
67
+
68
+ This software is governed by the CeCILL license under French law and
69
+ abiding by the rules of distribution of free software. You can use,
70
+ modify and/ or redistribute the software under the terms of the CeCILL
71
+ license as circulated by CEA, CNRS and INRIA at the following URL
72
+ "http://www.cecill.info".
73
+
74
+ As a counterpart to the access to the source code and rights to copy,
75
+ modify and redistribute granted by the license, users are provided only
76
+ with a limited warranty and the software's author, the holder of the
77
+ economic rights, and the successive licensors have only limited
78
+ liability.
79
+
80
+ In this respect, the user's attention is drawn to the risks associated
81
+ with loading, using, modifying and/or developing or reproducing the
82
+ software by the user in light of its specific status of free software,
83
+ that may mean that it is complicated to manipulate, and that also
84
+ therefore means that it is reserved for developers and experienced
85
+ professionals having in-depth computer knowledge. Users are therefore
86
+ encouraged to load and test the software's suitability as regards their
87
+ requirements in conditions enabling the security of their systems and/or
88
+ data to be ensured and, more generally, to use and operate it in the
89
+ same conditions as regards security.
90
+
91
+ The fact that you are presently reading this means that you have had
92
+ knowledge of the CeCILL license and that you accept its terms.
93
+
94
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
95
+
96
+ This software is being developed by Eric Debreuve, a CNRS employee and
97
+ member of team Morpheme.
98
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
99
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
100
+ I3S, and Laboratory iBV.
101
+
102
+ CNRS: https://www.cnrs.fr/index.php/en
103
+ Inria: https://www.inria.fr/en/
104
+ UniCA: https://univ-cotedazur.eu/
105
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
106
+ I3S: https://www.i3s.unice.fr/en/
107
+ iBV: http://ibv.unice.fr/
108
+ Team Morpheme: https://team.inria.fr/morpheme/
109
+ """
@@ -1,35 +1,10 @@
1
- # Copyright CNRS/Inria/UniCA
2
- # Contributor(s): Eric Debreuve (since 2023)
3
- #
4
- # eric.debreuve@cnrs.fr
5
- #
6
- # This software is governed by the CeCILL license under French law and
7
- # abiding by the rules of distribution of free software. You can use,
8
- # modify and/ or redistribute the software under the terms of the CeCILL
9
- # license as circulated by CEA, CNRS and INRIA at the following URL
10
- # "http://www.cecill.info".
11
- #
12
- # As a counterpart to the access to the source code and rights to copy,
13
- # modify and redistribute granted by the license, users are provided only
14
- # with a limited warranty and the software's author, the holder of the
15
- # economic rights, and the successive licensors have only limited
16
- # liability.
17
- #
18
- # In this respect, the user's attention is drawn to the risks associated
19
- # with loading, using, modifying and/or developing or reproducing the
20
- # software by the user in light of its specific status of free software,
21
- # that may mean that it is complicated to manipulate, and that also
22
- # therefore means that it is reserved for developers and experienced
23
- # professionals having in-depth computer knowledge. Users are therefore
24
- # encouraged to load and test the software's suitability as regards their
25
- # requirements in conditions enabling the security of their systems and/or
26
- # data to be ensured and, more generally, to use and operate it in the
27
- # same conditions as regards security.
28
- #
29
- # The fact that you are presently reading this means that you have had
30
- # knowledge of the CeCILL license and that you accept its terms.
31
-
32
- import dataclasses as dtcl
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 dataclasses as d
33
8
  import logging as lggg
34
9
  import typing as h
35
10
 
@@ -51,7 +26,7 @@ from logger_36.config.message import (
51
26
  from logger_36.constant.message import TIME_LENGTH
52
27
  from logger_36.constant.record import SHOW_W_RULE_ATTR
53
28
  from logger_36.task.format.rule import Rule
54
- from logger_36.type.extension import handler_extension_t
29
+ from logger_36.type.handler import handler_extension_t
55
30
  from rich.console import Console as console_t
56
31
  from rich.console import RenderableType as renderable_t
57
32
  from rich.markup import escape as EscapedForRich
@@ -72,21 +47,21 @@ _EXCLUSIVE_TRACEBACK_ARGUMENTS = (
72
47
  )
73
48
 
74
49
 
75
- @dtcl.dataclass(slots=True, repr=False, eq=False)
50
+ @d.dataclass(slots=True, repr=False, eq=False)
76
51
  class console_rich_handler_t(lggg.Handler):
77
- extension: handler_extension_t = dtcl.field(init=False)
78
- console: console_t = dtcl.field(init=False)
79
- FormattedLines: h.Callable[..., tuple[str, str | None]] = dtcl.field(init=False)
52
+ extension: handler_extension_t = d.field(init=False)
53
+ console: console_t = d.field(init=False)
54
+ FormattedLines: h.Callable[..., tuple[str, str | None]] = d.field(init=False)
80
55
 
81
- name: dtcl.InitVar[str | None] = None
82
- level: dtcl.InitVar[int] = lggg.NOTSET
83
- show_where: dtcl.InitVar[bool] = True
84
- show_memory_usage: dtcl.InitVar[bool] = False
85
- message_width: dtcl.InitVar[int] = -1
86
- formatter: dtcl.InitVar[lggg.Formatter | None] = None
87
- should_install_traceback: dtcl.InitVar[bool] = False
56
+ name: d.InitVar[str | None] = None
57
+ level: d.InitVar[int] = lggg.NOTSET
58
+ show_where: d.InitVar[bool] = True
59
+ show_memory_usage: d.InitVar[bool] = False
60
+ message_width: d.InitVar[int] = -1
61
+ formatter: d.InitVar[lggg.Formatter | None] = None
62
+ should_install_traceback: d.InitVar[bool] = False
88
63
 
89
- rich_kwargs: dtcl.InitVar[dict[str, h.Any] | None] = None
64
+ rich_kwargs: d.InitVar[dict[str, h.Any] | None] = None
90
65
 
91
66
  def __post_init__(
92
67
  self,
@@ -182,3 +157,50 @@ class console_rich_handler_t(lggg.Handler):
182
157
  _ = output.highlight_regex(EXPECTED_PATTERNS, style=EXPECTED_COLOR)
183
158
 
184
159
  return output
160
+
161
+
162
+ """
163
+ COPYRIGHT NOTICE
164
+
165
+ This software is governed by the CeCILL license under French law and
166
+ abiding by the rules of distribution of free software. You can use,
167
+ modify and/ or redistribute the software under the terms of the CeCILL
168
+ license as circulated by CEA, CNRS and INRIA at the following URL
169
+ "http://www.cecill.info".
170
+
171
+ As a counterpart to the access to the source code and rights to copy,
172
+ modify and redistribute granted by the license, users are provided only
173
+ with a limited warranty and the software's author, the holder of the
174
+ economic rights, and the successive licensors have only limited
175
+ liability.
176
+
177
+ In this respect, the user's attention is drawn to the risks associated
178
+ with loading, using, modifying and/or developing or reproducing the
179
+ software by the user in light of its specific status of free software,
180
+ that may mean that it is complicated to manipulate, and that also
181
+ therefore means that it is reserved for developers and experienced
182
+ professionals having in-depth computer knowledge. Users are therefore
183
+ encouraged to load and test the software's suitability as regards their
184
+ requirements in conditions enabling the security of their systems and/or
185
+ data to be ensured and, more generally, to use and operate it in the
186
+ same conditions as regards security.
187
+
188
+ The fact that you are presently reading this means that you have had
189
+ knowledge of the CeCILL license and that you accept its terms.
190
+
191
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
192
+
193
+ This software is being developed by Eric Debreuve, a CNRS employee and
194
+ member of team Morpheme.
195
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
196
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
197
+ I3S, and Laboratory iBV.
198
+
199
+ CNRS: https://www.cnrs.fr/index.php/en
200
+ Inria: https://www.inria.fr/en/
201
+ UniCA: https://univ-cotedazur.eu/
202
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
203
+ I3S: https://www.i3s.unice.fr/en/
204
+ iBV: http://ibv.unice.fr/
205
+ Team Morpheme: https://team.inria.fr/morpheme/
206
+ """
@@ -1,60 +1,35 @@
1
- # Copyright CNRS/Inria/UniCA
2
- # Contributor(s): Eric Debreuve (since 2023)
3
- #
4
- # eric.debreuve@cnrs.fr
5
- #
6
- # This software is governed by the CeCILL license under French law and
7
- # abiding by the rules of distribution of free software. You can use,
8
- # modify and/ or redistribute the software under the terms of the CeCILL
9
- # license as circulated by CEA, CNRS and INRIA at the following URL
10
- # "http://www.cecill.info".
11
- #
12
- # As a counterpart to the access to the source code and rights to copy,
13
- # modify and redistribute granted by the license, users are provided only
14
- # with a limited warranty and the software's author, the holder of the
15
- # economic rights, and the successive licensors have only limited
16
- # liability.
17
- #
18
- # In this respect, the user's attention is drawn to the risks associated
19
- # with loading, using, modifying and/or developing or reproducing the
20
- # software by the user in light of its specific status of free software,
21
- # that may mean that it is complicated to manipulate, and that also
22
- # therefore means that it is reserved for developers and experienced
23
- # professionals having in-depth computer knowledge. Users are therefore
24
- # encouraged to load and test the software's suitability as regards their
25
- # requirements in conditions enabling the security of their systems and/or
26
- # data to be ensured and, more generally, to use and operate it in the
27
- # same conditions as regards security.
28
- #
29
- # The fact that you are presently reading this means that you have had
30
- # knowledge of the CeCILL license and that you accept its terms.
31
-
32
- import dataclasses as dtcl
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 dataclasses as d
33
8
  import logging as lggg
34
9
  import typing as h
35
10
  from pathlib import Path as path_t
36
11
 
37
12
  from logger_36.constant.record import SHOW_W_RULE_ATTR
38
13
  from logger_36.task.format.rule import RuleAsText
39
- from logger_36.type.extension import handler_extension_t
14
+ from logger_36.type.handler import handler_extension_t
40
15
 
41
16
 
42
- @dtcl.dataclass(slots=True, repr=False, eq=False)
17
+ @d.dataclass(slots=True, repr=False, eq=False)
43
18
  class file_handler_t(lggg.FileHandler):
44
19
 
45
- extension: handler_extension_t = dtcl.field(init=False)
46
- FormattedLines: h.Callable[..., tuple[str, str | None]] = dtcl.field(init=False)
20
+ extension: handler_extension_t = d.field(init=False)
21
+ FormattedLines: h.Callable[..., tuple[str, str | None]] = d.field(init=False)
47
22
 
48
- name: dtcl.InitVar[str | None] = None
49
- level: dtcl.InitVar[int] = lggg.NOTSET
50
- show_where: dtcl.InitVar[bool] = True
51
- show_memory_usage: dtcl.InitVar[bool] = False
52
- message_width: dtcl.InitVar[int] = -1
53
- formatter: dtcl.InitVar[lggg.Formatter | None] = None
23
+ name: d.InitVar[str | None] = None
24
+ level: d.InitVar[int] = lggg.NOTSET
25
+ show_where: d.InitVar[bool] = True
26
+ show_memory_usage: d.InitVar[bool] = False
27
+ message_width: d.InitVar[int] = -1
28
+ formatter: d.InitVar[lggg.Formatter | None] = None
54
29
 
55
- path: dtcl.InitVar[path_t | None] = None
56
- handler_args: dtcl.InitVar[tuple[h.Any, ...] | None] = None
57
- handler_kwargs: dtcl.InitVar[dict[str, h.Any] | None] = None
30
+ path: d.InitVar[path_t | None] = None
31
+ handler_args: d.InitVar[tuple[h.Any, ...] | None] = None
32
+ handler_kwargs: d.InitVar[dict[str, h.Any] | None] = None
58
33
 
59
34
  def __post_init__(
60
35
  self,
@@ -96,3 +71,50 @@ class file_handler_t(lggg.FileHandler):
96
71
  """"""
97
72
  print(message, file=self.stream)
98
73
  self.stream.flush()
74
+
75
+
76
+ """
77
+ COPYRIGHT NOTICE
78
+
79
+ This software is governed by the CeCILL license under French law and
80
+ abiding by the rules of distribution of free software. You can use,
81
+ modify and/ or redistribute the software under the terms of the CeCILL
82
+ license as circulated by CEA, CNRS and INRIA at the following URL
83
+ "http://www.cecill.info".
84
+
85
+ As a counterpart to the access to the source code and rights to copy,
86
+ modify and redistribute granted by the license, users are provided only
87
+ with a limited warranty and the software's author, the holder of the
88
+ economic rights, and the successive licensors have only limited
89
+ liability.
90
+
91
+ In this respect, the user's attention is drawn to the risks associated
92
+ with loading, using, modifying and/or developing or reproducing the
93
+ software by the user in light of its specific status of free software,
94
+ that may mean that it is complicated to manipulate, and that also
95
+ therefore means that it is reserved for developers and experienced
96
+ professionals having in-depth computer knowledge. Users are therefore
97
+ encouraged to load and test the software's suitability as regards their
98
+ requirements in conditions enabling the security of their systems and/or
99
+ data to be ensured and, more generally, to use and operate it in the
100
+ same conditions as regards security.
101
+
102
+ The fact that you are presently reading this means that you have had
103
+ knowledge of the CeCILL license and that you accept its terms.
104
+
105
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
106
+
107
+ This software is being developed by Eric Debreuve, a CNRS employee and
108
+ member of team Morpheme.
109
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
110
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
111
+ I3S, and Laboratory iBV.
112
+
113
+ CNRS: https://www.cnrs.fr/index.php/en
114
+ Inria: https://www.inria.fr/en/
115
+ UniCA: https://univ-cotedazur.eu/
116
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
117
+ I3S: https://www.i3s.unice.fr/en/
118
+ iBV: http://ibv.unice.fr/
119
+ Team Morpheme: https://team.inria.fr/morpheme/
120
+ """