logger-36 2024.14__tar.gz → 2024.16__tar.gz
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-2024.14 → logger_36-2024.16}/MANIFEST.in +0 -1
- {logger_36-2024.14 → logger_36-2024.16}/PKG-INFO +48 -30
- logger_36-2024.16/README-COPYRIGHT-utf8.txt +44 -0
- {logger_36-2024.14 → logger_36-2024.16}/README.rst +47 -29
- {logger_36-2024.14 → logger_36-2024.16}/documentation/wiki/description.asciidoc +46 -29
- logger_36-2024.16/logger_36/__init__.py +62 -0
- logger_36-2024.16/logger_36/catalog/config/console_rich.py +73 -0
- logger_36-2024.16/logger_36/catalog/handler/console.py +109 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36/catalog/handler/console_rich.py +67 -45
- logger_36-2024.16/logger_36/catalog/handler/file.py +120 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36/catalog/handler/generic.py +72 -51
- logger_36-2024.16/logger_36/catalog/logging/chronos.py +62 -0
- logger_36-2024.16/logger_36/catalog/logging/exception.py +74 -0
- logger_36-2024.16/logger_36/catalog/logging/gpu.py +92 -0
- logger_36-2024.16/logger_36/catalog/logging/memory.py +132 -0
- logger_36-2024.16/logger_36/catalog/logging/system.py +86 -0
- logger_36-2024.16/logger_36/config/issue.py +56 -0
- logger_36-2024.16/logger_36/config/memory.py +54 -0
- logger_36-2024.16/logger_36/config/message.py +67 -0
- logger_36-2024.16/logger_36/config/system.py +70 -0
- logger_36-2024.16/logger_36/constant/error.py +70 -0
- logger_36-2024.16/logger_36/constant/generic.py +58 -0
- logger_36-2024.16/logger_36/constant/handler.py +56 -0
- logger_36-2024.16/logger_36/constant/issue.py +56 -0
- logger_36-2024.16/logger_36/constant/logger.py +71 -0
- logger_36-2024.16/logger_36/constant/memory.py +58 -0
- logger_36-2024.16/logger_36/constant/message.py +69 -0
- logger_36-2024.16/logger_36/constant/record.py +56 -0
- logger_36-2024.16/logger_36/constant/system.py +67 -0
- logger_36-2024.16/logger_36/instance/logger.py +55 -0
- logger_36-2024.16/logger_36/instance/loggers.py +56 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36/main.py +61 -33
- logger_36-2024.16/logger_36/task/format/memory.py +132 -0
- logger_36-2024.16/logger_36/task/format/message.py +134 -0
- logger_36-2024.16/logger_36/task/format/rule.py +68 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36/task/inspection.py +52 -30
- logger_36-2024.16/logger_36/task/measure/chronos.py +79 -0
- logger_36-2024.16/logger_36/task/measure/memory.py +72 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36/task/storage.py +60 -38
- logger_36-2024.14/logger_36/type/extension.py → logger_36-2024.16/logger_36/type/handler.py +59 -37
- logger_36-2024.16/logger_36/type/issue.py +86 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36/type/logger.py +80 -52
- logger_36-2024.16/logger_36/type/loggers.py +78 -0
- logger_36-2024.16/logger_36/version.py +53 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36.egg-info/PKG-INFO +48 -30
- {logger_36-2024.14 → logger_36-2024.16}/logger_36.egg-info/SOURCES.txt +6 -3
- {logger_36-2024.14 → logger_36-2024.16}/setup.py +52 -30
- logger_36-2024.14/README-COPYRIGHT-utf8.txt +0 -16
- logger_36-2024.14/logger_36/__init__.py +0 -39
- logger_36-2024.14/logger_36/catalog/config/console_rich.py +0 -52
- logger_36-2024.14/logger_36/catalog/handler/console.py +0 -87
- logger_36-2024.14/logger_36/catalog/handler/file.py +0 -98
- logger_36-2024.14/logger_36/catalog/logging/chronos.py +0 -39
- logger_36-2024.14/logger_36/catalog/logging/gpu.py +0 -69
- logger_36-2024.14/logger_36/catalog/logging/memory.py +0 -105
- logger_36-2024.14/logger_36/catalog/logging/system.py +0 -62
- logger_36-2024.14/logger_36/config/issue.py +0 -35
- logger_36-2024.14/logger_36/config/memory.py +0 -33
- logger_36-2024.14/logger_36/config/message.py +0 -46
- logger_36-2024.14/logger_36/config/system.py +0 -49
- logger_36-2024.14/logger_36/constant/error.py +0 -49
- logger_36-2024.14/logger_36/constant/generic.py +0 -37
- logger_36-2024.14/logger_36/constant/handler.py +0 -35
- logger_36-2024.14/logger_36/constant/issue.py +0 -35
- logger_36-2024.14/logger_36/constant/logger.py +0 -50
- logger_36-2024.14/logger_36/constant/memory.py +0 -37
- logger_36-2024.14/logger_36/constant/message.py +0 -48
- logger_36-2024.14/logger_36/constant/record.py +0 -35
- logger_36-2024.14/logger_36/constant/system.py +0 -39
- logger_36-2024.14/logger_36/instance.py +0 -34
- logger_36-2024.14/logger_36/task/format/memory.py +0 -110
- logger_36-2024.14/logger_36/task/format/message.py +0 -112
- logger_36-2024.14/logger_36/task/format/rule.py +0 -47
- logger_36-2024.14/logger_36/task/measure/chronos.py +0 -57
- logger_36-2024.14/logger_36/task/measure/memory.py +0 -50
- logger_36-2024.14/logger_36/type/issue.py +0 -57
- logger_36-2024.14/logger_36/version.py +0 -32
- {logger_36-2024.14 → logger_36-2024.16}/README-LICENCE-utf8.txt +0 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36.egg-info/dependency_links.txt +0 -0
- {logger_36-2024.14 → logger_36-2024.16}/logger_36.egg-info/top_level.txt +0 -0
- {logger_36-2024.14 → logger_36-2024.16}/pyproject.toml +0 -0
- {logger_36-2024.14 → logger_36-2024.16}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: logger-36
|
3
|
-
Version: 2024.
|
3
|
+
Version: 2024.16
|
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
|
@@ -19,35 +19,8 @@ Description-Content-Type: text/x-rst
|
|
19
19
|
|
20
20
|
..
|
21
21
|
Copyright CNRS/Inria/UniCA
|
22
|
-
Contributor(s): Eric Debreuve (since 2023
|
23
|
-
|
24
|
-
eric.debreuve@cnrs.fr
|
25
|
-
|
26
|
-
This software is governed by the CeCILL license under French law and
|
27
|
-
abiding by the rules of distribution of free software. You can use,
|
28
|
-
modify and/ or redistribute the software under the terms of the CeCILL
|
29
|
-
license as circulated by CEA, CNRS and INRIA at the following URL
|
30
|
-
"http://www.cecill.info".
|
31
|
-
|
32
|
-
As a counterpart to the access to the source code and rights to copy,
|
33
|
-
modify and redistribute granted by the license, users are provided only
|
34
|
-
with a limited warranty and the software's author, the holder of the
|
35
|
-
economic rights, and the successive licensors have only limited
|
36
|
-
liability.
|
37
|
-
|
38
|
-
In this respect, the user's attention is drawn to the risks associated
|
39
|
-
with loading, using, modifying and/or developing or reproducing the
|
40
|
-
software by the user in light of its specific status of free software,
|
41
|
-
that may mean that it is complicated to manipulate, and that also
|
42
|
-
therefore means that it is reserved for developers and experienced
|
43
|
-
professionals having in-depth computer knowledge. Users are therefore
|
44
|
-
encouraged to load and test the software's suitability as regards their
|
45
|
-
requirements in conditions enabling the security of their systems and/or
|
46
|
-
data to be ensured and, more generally, to use and operate it in the
|
47
|
-
same conditions as regards security.
|
48
|
-
|
49
|
-
The fact that you are presently reading this means that you have had
|
50
|
-
knowledge of the CeCILL license and that you accept its terms.
|
22
|
+
Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
23
|
+
SEE COPYRIGHT NOTICE BELOW
|
51
24
|
|
52
25
|
.. |PROJECT_NAME| replace:: logger-36
|
53
26
|
.. |SHORT_DESCRIPTION| replace:: Simple logger with a catalog of handlers
|
@@ -123,3 +96,48 @@ The project is developed with `PyCharm Community <https://www.jetbrains.com/pych
|
|
123
96
|
The code is formatted by `Black <https://github.com/psf/black/>`_, *The Uncompromising Code Formatter*.
|
124
97
|
|
125
98
|
The imports are ordered by `isort <https://github.com/timothycrosley/isort/>`_... *your imports, so you don't have to*.
|
99
|
+
|
100
|
+
..
|
101
|
+
COPYRIGHT NOTICE
|
102
|
+
|
103
|
+
This software is governed by the CeCILL license under French law and
|
104
|
+
abiding by the rules of distribution of free software. You can use,
|
105
|
+
modify and/ or redistribute the software under the terms of the CeCILL
|
106
|
+
license as circulated by CEA, CNRS and INRIA at the following URL
|
107
|
+
"http://www.cecill.info".
|
108
|
+
|
109
|
+
As a counterpart to the access to the source code and rights to copy,
|
110
|
+
modify and redistribute granted by the license, users are provided only
|
111
|
+
with a limited warranty and the software's author, the holder of the
|
112
|
+
economic rights, and the successive licensors have only limited
|
113
|
+
liability.
|
114
|
+
|
115
|
+
In this respect, the user's attention is drawn to the risks associated
|
116
|
+
with loading, using, modifying and/or developing or reproducing the
|
117
|
+
software by the user in light of its specific status of free software,
|
118
|
+
that may mean that it is complicated to manipulate, and that also
|
119
|
+
therefore means that it is reserved for developers and experienced
|
120
|
+
professionals having in-depth computer knowledge. Users are therefore
|
121
|
+
encouraged to load and test the software's suitability as regards their
|
122
|
+
requirements in conditions enabling the security of their systems and/or
|
123
|
+
data to be ensured and, more generally, to use and operate it in the
|
124
|
+
same conditions as regards security.
|
125
|
+
|
126
|
+
The fact that you are presently reading this means that you have had
|
127
|
+
knowledge of the CeCILL license and that you accept its terms.
|
128
|
+
|
129
|
+
SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
|
130
|
+
|
131
|
+
This software is being developed by Eric Debreuve, a CNRS employee and
|
132
|
+
member of team Morpheme.
|
133
|
+
Team Morpheme is a joint team between Inria, CNRS, and UniCA.
|
134
|
+
It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
|
135
|
+
I3S, and Laboratory iBV.
|
136
|
+
|
137
|
+
CNRS: https://www.cnrs.fr/index.php/en
|
138
|
+
Inria: https://www.inria.fr/en/
|
139
|
+
UniCA: https://univ-cotedazur.eu/
|
140
|
+
Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
|
141
|
+
I3S: https://www.i3s.unice.fr/en/
|
142
|
+
iBV: http://ibv.unice.fr/
|
143
|
+
Team Morpheme: https://team.inria.fr/morpheme/
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Copyright CNRS/Inria/UniCA
|
2
|
+
Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
3
|
+
|
4
|
+
This software is governed by the CeCILL license under French law and
|
5
|
+
abiding by the rules of distribution of free software. You can use,
|
6
|
+
modify and/ or redistribute the software under the terms of the CeCILL
|
7
|
+
license as circulated by CEA, CNRS and INRIA at the following URL
|
8
|
+
"http://www.cecill.info".
|
9
|
+
|
10
|
+
As a counterpart to the access to the source code and rights to copy,
|
11
|
+
modify and redistribute granted by the license, users are provided only
|
12
|
+
with a limited warranty and the software's author, the holder of the
|
13
|
+
economic rights, and the successive licensors have only limited
|
14
|
+
liability.
|
15
|
+
|
16
|
+
In this respect, the user's attention is drawn to the risks associated
|
17
|
+
with loading, using, modifying and/or developing or reproducing the
|
18
|
+
software by the user in light of its specific status of free software,
|
19
|
+
that may mean that it is complicated to manipulate, and that also
|
20
|
+
therefore means that it is reserved for developers and experienced
|
21
|
+
professionals having in-depth computer knowledge. Users are therefore
|
22
|
+
encouraged to load and test the software's suitability as regards their
|
23
|
+
requirements in conditions enabling the security of their systems and/or
|
24
|
+
data to be ensured and, more generally, to use and operate it in the
|
25
|
+
same conditions as regards security.
|
26
|
+
|
27
|
+
The fact that you are presently reading this means that you have had
|
28
|
+
knowledge of the CeCILL license and that you accept its terms.
|
29
|
+
|
30
|
+
SEE LICENCE NOTICE: README-LICENCE-utf8.txt
|
31
|
+
|
32
|
+
This software is being developed by Eric Debreuve, a CNRS employee and
|
33
|
+
member of team Morpheme.
|
34
|
+
Team Morpheme is a joint team between Inria, CNRS, and UniCA.
|
35
|
+
It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
|
36
|
+
I3S, and Laboratory iBV.
|
37
|
+
|
38
|
+
CNRS: https://www.cnrs.fr/index.php/en
|
39
|
+
Inria: https://www.inria.fr/en/
|
40
|
+
UniCA: https://univ-cotedazur.eu/
|
41
|
+
Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
|
42
|
+
I3S: https://www.i3s.unice.fr/en/
|
43
|
+
iBV: http://ibv.unice.fr/
|
44
|
+
Team Morpheme: https://team.inria.fr/morpheme/
|
@@ -1,34 +1,7 @@
|
|
1
1
|
..
|
2
2
|
Copyright CNRS/Inria/UniCA
|
3
|
-
Contributor(s): Eric Debreuve (since 2023
|
4
|
-
|
5
|
-
eric.debreuve@cnrs.fr
|
6
|
-
|
7
|
-
This software is governed by the CeCILL license under French law and
|
8
|
-
abiding by the rules of distribution of free software. You can use,
|
9
|
-
modify and/ or redistribute the software under the terms of the CeCILL
|
10
|
-
license as circulated by CEA, CNRS and INRIA at the following URL
|
11
|
-
"http://www.cecill.info".
|
12
|
-
|
13
|
-
As a counterpart to the access to the source code and rights to copy,
|
14
|
-
modify and redistribute granted by the license, users are provided only
|
15
|
-
with a limited warranty and the software's author, the holder of the
|
16
|
-
economic rights, and the successive licensors have only limited
|
17
|
-
liability.
|
18
|
-
|
19
|
-
In this respect, the user's attention is drawn to the risks associated
|
20
|
-
with loading, using, modifying and/or developing or reproducing the
|
21
|
-
software by the user in light of its specific status of free software,
|
22
|
-
that may mean that it is complicated to manipulate, and that also
|
23
|
-
therefore means that it is reserved for developers and experienced
|
24
|
-
professionals having in-depth computer knowledge. Users are therefore
|
25
|
-
encouraged to load and test the software's suitability as regards their
|
26
|
-
requirements in conditions enabling the security of their systems and/or
|
27
|
-
data to be ensured and, more generally, to use and operate it in the
|
28
|
-
same conditions as regards security.
|
29
|
-
|
30
|
-
The fact that you are presently reading this means that you have had
|
31
|
-
knowledge of the CeCILL license and that you accept its terms.
|
3
|
+
Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
4
|
+
SEE COPYRIGHT NOTICE BELOW
|
32
5
|
|
33
6
|
.. |PROJECT_NAME| replace:: logger-36
|
34
7
|
.. |SHORT_DESCRIPTION| replace:: Simple logger with a catalog of handlers
|
@@ -104,3 +77,48 @@ The project is developed with `PyCharm Community <https://www.jetbrains.com/pych
|
|
104
77
|
The code is formatted by `Black <https://github.com/psf/black/>`_, *The Uncompromising Code Formatter*.
|
105
78
|
|
106
79
|
The imports are ordered by `isort <https://github.com/timothycrosley/isort/>`_... *your imports, so you don't have to*.
|
80
|
+
|
81
|
+
..
|
82
|
+
COPYRIGHT NOTICE
|
83
|
+
|
84
|
+
This software is governed by the CeCILL license under French law and
|
85
|
+
abiding by the rules of distribution of free software. You can use,
|
86
|
+
modify and/ or redistribute the software under the terms of the CeCILL
|
87
|
+
license as circulated by CEA, CNRS and INRIA at the following URL
|
88
|
+
"http://www.cecill.info".
|
89
|
+
|
90
|
+
As a counterpart to the access to the source code and rights to copy,
|
91
|
+
modify and redistribute granted by the license, users are provided only
|
92
|
+
with a limited warranty and the software's author, the holder of the
|
93
|
+
economic rights, and the successive licensors have only limited
|
94
|
+
liability.
|
95
|
+
|
96
|
+
In this respect, the user's attention is drawn to the risks associated
|
97
|
+
with loading, using, modifying and/or developing or reproducing the
|
98
|
+
software by the user in light of its specific status of free software,
|
99
|
+
that may mean that it is complicated to manipulate, and that also
|
100
|
+
therefore means that it is reserved for developers and experienced
|
101
|
+
professionals having in-depth computer knowledge. Users are therefore
|
102
|
+
encouraged to load and test the software's suitability as regards their
|
103
|
+
requirements in conditions enabling the security of their systems and/or
|
104
|
+
data to be ensured and, more generally, to use and operate it in the
|
105
|
+
same conditions as regards security.
|
106
|
+
|
107
|
+
The fact that you are presently reading this means that you have had
|
108
|
+
knowledge of the CeCILL license and that you accept its terms.
|
109
|
+
|
110
|
+
SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
|
111
|
+
|
112
|
+
This software is being developed by Eric Debreuve, a CNRS employee and
|
113
|
+
member of team Morpheme.
|
114
|
+
Team Morpheme is a joint team between Inria, CNRS, and UniCA.
|
115
|
+
It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
|
116
|
+
I3S, and Laboratory iBV.
|
117
|
+
|
118
|
+
CNRS: https://www.cnrs.fr/index.php/en
|
119
|
+
Inria: https://www.inria.fr/en/
|
120
|
+
UniCA: https://univ-cotedazur.eu/
|
121
|
+
Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
|
122
|
+
I3S: https://www.i3s.unice.fr/en/
|
123
|
+
iBV: http://ibv.unice.fr/
|
124
|
+
Team Morpheme: https://team.inria.fr/morpheme/
|
@@ -1,33 +1,6 @@
|
|
1
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.
|
2
|
+
// Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
|
3
|
+
// SEE COPYRIGHT NOTICE BELOW
|
31
4
|
|
32
5
|
:AUTHOR: Eric Debreuve
|
33
6
|
:EMAIL: eric.debreuve@cnrs.fr
|
@@ -56,3 +29,47 @@
|
|
56
29
|
:CONFIG_FOLDER: None
|
57
30
|
|
58
31
|
:DEPENDENCIES_OPTIONAL: psutil, rich, tensorflow, tensorrt
|
32
|
+
|
33
|
+
// COPYRIGHT NOTICE
|
34
|
+
//
|
35
|
+
// This software is governed by the CeCILL license under French law and
|
36
|
+
// abiding by the rules of distribution of free software. You can use,
|
37
|
+
// modify and/ or redistribute the software under the terms of the CeCILL
|
38
|
+
// license as circulated by CEA, CNRS and INRIA at the following URL
|
39
|
+
// "http://www.cecill.info".
|
40
|
+
//
|
41
|
+
// As a counterpart to the access to the source code and rights to copy,
|
42
|
+
// modify and redistribute granted by the license, users are provided only
|
43
|
+
// with a limited warranty and the software's author, the holder of the
|
44
|
+
// economic rights, and the successive licensors have only limited
|
45
|
+
// liability.
|
46
|
+
//
|
47
|
+
// In this respect, the user's attention is drawn to the risks associated
|
48
|
+
// with loading, using, modifying and/or developing or reproducing the
|
49
|
+
// software by the user in light of its specific status of free software,
|
50
|
+
// that may mean that it is complicated to manipulate, and that also
|
51
|
+
// therefore means that it is reserved for developers and experienced
|
52
|
+
// professionals having in-depth computer knowledge. Users are therefore
|
53
|
+
// encouraged to load and test the software's suitability as regards their
|
54
|
+
// requirements in conditions enabling the security of their systems and/or
|
55
|
+
// data to be ensured and, more generally, to use and operate it in the
|
56
|
+
// same conditions as regards security.
|
57
|
+
//
|
58
|
+
// The fact that you are presently reading this means that you have had
|
59
|
+
// knowledge of the CeCILL license and that you accept its terms.
|
60
|
+
//
|
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/
|
@@ -0,0 +1,62 @@
|
|
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
|
8
|
+
from logger_36.main import (
|
9
|
+
AddConsoleHandler,
|
10
|
+
AddFileHandler,
|
11
|
+
AddGenericHandler,
|
12
|
+
AddRichConsoleHandler,
|
13
|
+
)
|
14
|
+
from logger_36.task.format.message import FormattedMessage
|
15
|
+
from logger_36.type.logger import logger_t
|
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
|
+
"""
|
@@ -0,0 +1,73 @@
|
|
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 lggg
|
8
|
+
|
9
|
+
from rich.color import Color as color_t
|
10
|
+
from rich.style import Style as style_t
|
11
|
+
|
12
|
+
"""
|
13
|
+
Colors: See https://rich.readthedocs.io/en/stable/appendix/colors.html.
|
14
|
+
"""
|
15
|
+
DATE_TIME_COLOR = "dodger_blue2"
|
16
|
+
LEVEL_COLOR: dict[int, str | style_t] = {
|
17
|
+
lggg.DEBUG: "orchid",
|
18
|
+
lggg.INFO: "white",
|
19
|
+
lggg.WARNING: "yellow",
|
20
|
+
lggg.ERROR: "orange1",
|
21
|
+
lggg.CRITICAL: "red",
|
22
|
+
}
|
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.
|
54
|
+
|
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
|
+
"""
|
@@ -0,0 +1,109 @@
|
|
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
|
8
|
+
import logging as lggg
|
9
|
+
import typing as h
|
10
|
+
|
11
|
+
from logger_36.constant.record import SHOW_W_RULE_ATTR
|
12
|
+
from logger_36.task.format.rule import RuleAsText
|
13
|
+
from logger_36.type.handler import handler_extension_t
|
14
|
+
|
15
|
+
|
16
|
+
@d.dataclass(slots=True, repr=False, eq=False)
|
17
|
+
class console_handler_t(lggg.Handler):
|
18
|
+
extension: handler_extension_t = d.field(init=False)
|
19
|
+
FormattedLines: h.Callable[..., tuple[str, str | None]] = d.field(init=False)
|
20
|
+
|
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
|
27
|
+
|
28
|
+
def __post_init__(
|
29
|
+
self,
|
30
|
+
name: str | None,
|
31
|
+
level: int,
|
32
|
+
show_where: bool,
|
33
|
+
show_memory_usage: bool,
|
34
|
+
message_width: int,
|
35
|
+
formatter: lggg.Formatter | None,
|
36
|
+
) -> None:
|
37
|
+
""""""
|
38
|
+
lggg.Handler.__init__(self)
|
39
|
+
|
40
|
+
self.extension = handler_extension_t(
|
41
|
+
name=name,
|
42
|
+
show_where=show_where,
|
43
|
+
show_memory_usage=show_memory_usage,
|
44
|
+
handler=self,
|
45
|
+
level=level,
|
46
|
+
message_width=message_width,
|
47
|
+
formatter=formatter,
|
48
|
+
)
|
49
|
+
|
50
|
+
self.FormattedLines = self.extension.FormattedLines
|
51
|
+
|
52
|
+
def emit(self, record: lggg.LogRecord, /) -> None:
|
53
|
+
""""""
|
54
|
+
if hasattr(record, SHOW_W_RULE_ATTR):
|
55
|
+
message = RuleAsText(record.msg)
|
56
|
+
else:
|
57
|
+
message, _ = self.FormattedLines(record, should_join_lines=True)
|
58
|
+
print(message)
|
59
|
+
|
60
|
+
def ShowMessage(self, message: str, /) -> None:
|
61
|
+
""""""
|
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
|
+
"""
|