log21 2.8.0__tar.gz → 2.8.1__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.
- {log21-2.8.0 → log21-2.8.1}/PKG-INFO +7 -8
- {log21-2.8.0 → log21-2.8.1}/README.md +6 -7
- {log21-2.8.0 → log21-2.8.1}/pyproject.toml +7 -1
- {log21-2.8.0 → log21-2.8.1}/src/log21/StreamHandler.py +1 -1
- {log21-2.8.0 → log21-2.8.1}/src/log21/__init__.py +14 -15
- {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/PKG-INFO +7 -8
- {log21-2.8.0 → log21-2.8.1}/LICENSE.txt +0 -0
- {log21-2.8.0 → log21-2.8.1}/setup.cfg +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Argparse.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Argumentify.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Colors.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/CrashReporter/Formatters.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/CrashReporter/Reporters.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/CrashReporter/__init__.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/FileHandler.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Formatters.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Levels.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Logger.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/LoggingWindow.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/Manager.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/PPrint.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/ProgressBar.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21/TreePrint.py +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/SOURCES.txt +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/dependency_links.txt +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/requires.txt +0 -0
- {log21-2.8.0 → log21-2.8.1}/src/log21.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: log21
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.1
|
|
4
4
|
Summary: A simple logging package that helps you log colorized messages in Windows console.
|
|
5
5
|
Author-email: "CodeWriter21(Mehrad Pooryoussof)" <CodeWriter21@gmail.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -92,13 +92,12 @@ pip install git+https://github.com/MPCodeWriter21/log21
|
|
|
92
92
|
Changes
|
|
93
93
|
-------
|
|
94
94
|
|
|
95
|
-
### 2.8.
|
|
95
|
+
### 2.8.1
|
|
96
96
|
|
|
97
|
-
+
|
|
98
|
-
+
|
|
99
|
-
+ Added
|
|
100
|
-
+
|
|
101
|
-
+ Ability to add new methods to the Logger object for each custom level.
|
|
97
|
+
+ Fixed Carriage Return Handling.
|
|
98
|
+
+ Fixed setting level using `log21.basic_config`
|
|
99
|
+
+ Added more configuration for developer tools to the `pyproject.toml` file.
|
|
100
|
+
+ Added pre-commit.
|
|
102
101
|
|
|
103
102
|
[Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
|
|
104
103
|
|
|
@@ -237,7 +236,7 @@ for character in text:
|
|
|
237
236
|
|
|
238
237
|
window.error(colored_text)
|
|
239
238
|
|
|
240
|
-
# See more examples in
|
|
239
|
+
# See more examples in
|
|
241
240
|
# https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/LoggingWindow.py#L155
|
|
242
241
|
# and
|
|
243
242
|
# https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/__init__.py#L144
|
|
@@ -61,13 +61,12 @@ pip install git+https://github.com/MPCodeWriter21/log21
|
|
|
61
61
|
Changes
|
|
62
62
|
-------
|
|
63
63
|
|
|
64
|
-
### 2.8.
|
|
64
|
+
### 2.8.1
|
|
65
65
|
|
|
66
|
-
+
|
|
67
|
-
+
|
|
68
|
-
+ Added
|
|
69
|
-
+
|
|
70
|
-
+ Ability to add new methods to the Logger object for each custom level.
|
|
66
|
+
+ Fixed Carriage Return Handling.
|
|
67
|
+
+ Fixed setting level using `log21.basic_config`
|
|
68
|
+
+ Added more configuration for developer tools to the `pyproject.toml` file.
|
|
69
|
+
+ Added pre-commit.
|
|
71
70
|
|
|
72
71
|
[Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
|
|
73
72
|
|
|
@@ -206,7 +205,7 @@ for character in text:
|
|
|
206
205
|
|
|
207
206
|
window.error(colored_text)
|
|
208
207
|
|
|
209
|
-
# See more examples in
|
|
208
|
+
# See more examples in
|
|
210
209
|
# https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/LoggingWindow.py#L155
|
|
211
210
|
# and
|
|
212
211
|
# https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/__init__.py#L144
|
|
@@ -26,7 +26,7 @@ dependencies = [
|
|
|
26
26
|
"webcolors",
|
|
27
27
|
"docstring-parser"
|
|
28
28
|
]
|
|
29
|
-
version = "2.8.
|
|
29
|
+
version = "2.8.1"
|
|
30
30
|
|
|
31
31
|
[tool.setuptools.packages.find]
|
|
32
32
|
where = ["src"]
|
|
@@ -62,4 +62,10 @@ dedent_closing_brackets = true
|
|
|
62
62
|
[tool.isort]
|
|
63
63
|
line_length = 88
|
|
64
64
|
combine_as_imports = true
|
|
65
|
+
length_sort = true
|
|
65
66
|
order_by_type = true
|
|
67
|
+
|
|
68
|
+
[tool.docformatter]
|
|
69
|
+
recursive = true
|
|
70
|
+
wrap-summaries = 88
|
|
71
|
+
wrap-descriptions = 88
|
|
@@ -53,7 +53,7 @@ class StreamHandler(_StreamHandler):
|
|
|
53
53
|
msg = _hex_escape.sub(
|
|
54
54
|
'', _ansi_escape.sub('', record.msg.strip(' \t\n\x0b\x0c'))
|
|
55
55
|
)
|
|
56
|
-
if '\r'
|
|
56
|
+
if '\r' == msg[:1]:
|
|
57
57
|
file_descriptor = getattr(self.stream, 'fileno', None)
|
|
58
58
|
if file_descriptor:
|
|
59
59
|
file_descriptor = file_descriptor()
|
|
@@ -23,18 +23,17 @@ from log21.ProgressBar import ProgressBar
|
|
|
23
23
|
from log21.LoggingWindow import LoggingWindow, LoggingWindowHandler
|
|
24
24
|
from log21.StreamHandler import StreamHandler, ColorizingStreamHandler
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
__github__ = "Https://GitHub.com/MPCodeWriter21/log21"
|
|
26
|
+
__author__ = 'CodeWriter21 (Mehrad Pooryoussof)'
|
|
27
|
+
__github__ = 'Https://GitHub.com/MPCodeWriter21/log21'
|
|
29
28
|
__all__ = [
|
|
30
29
|
'ColorizingStreamHandler', 'DecolorizingFileHandler', 'ColorizingFormatter',
|
|
31
30
|
'DecolorizingFormatter', 'get_logger', 'Logger', 'Colors', 'get_color',
|
|
32
31
|
'get_colors', 'CRITICAL', 'FATAL', 'ERROR', 'WARNING', 'WARN', 'INFO', 'DEBUG',
|
|
33
32
|
'NOTSET', 'INPUT', 'StreamHandler', 'ColorizingArgumentParser', 'PrettyPrinter',
|
|
34
33
|
'pformat', 'pprint', 'pretty_print', 'tree_format', 'TreePrint', 'Manager',
|
|
35
|
-
'get_color_name', 'closest_color', 'ansi_escape', '
|
|
36
|
-
'
|
|
37
|
-
'
|
|
34
|
+
'get_color_name', 'closest_color', 'ansi_escape', '__author__', '__github__',
|
|
35
|
+
'debug', 'info', 'warning', 'warn', 'error', 'critical', 'fatal', 'exception',
|
|
36
|
+
'log', 'basic_config', 'basicConfig', 'ProgressBar', 'progress_bar',
|
|
38
37
|
'LoggingWindow', 'LoggingWindowHandler', 'get_logging_window', 'CrashReporter',
|
|
39
38
|
'console_reporter', 'file_reporter', 'argumentify'
|
|
40
39
|
]
|
|
@@ -46,7 +45,7 @@ _logging.setLoggerClass(Logger)
|
|
|
46
45
|
def _prepare_formatter(
|
|
47
46
|
fmt: _Optional[str] = None,
|
|
48
47
|
style: str = '%',
|
|
49
|
-
datefmt: str =
|
|
48
|
+
datefmt: str = '%H:%M:%S',
|
|
50
49
|
show_level: bool = True,
|
|
51
50
|
show_time: bool = True,
|
|
52
51
|
colorize_time_and_level: bool = True,
|
|
@@ -57,11 +56,11 @@ def _prepare_formatter(
|
|
|
57
56
|
# Prepares a formatting if the fmt was None
|
|
58
57
|
if not fmt:
|
|
59
58
|
style = '%'
|
|
60
|
-
fmt =
|
|
59
|
+
fmt = '%(message)s'
|
|
61
60
|
if show_level:
|
|
62
|
-
fmt =
|
|
61
|
+
fmt = '[%(levelname)s] ' + fmt
|
|
63
62
|
if show_time:
|
|
64
|
-
fmt =
|
|
63
|
+
fmt = '[%(asctime)s] ' + fmt
|
|
65
64
|
fmt = '\r' + fmt
|
|
66
65
|
|
|
67
66
|
if level_colors and not issubclass(formatter_class, ColorizingFormatter):
|
|
@@ -101,7 +100,7 @@ def get_logger(
|
|
|
101
100
|
show_level: bool = True,
|
|
102
101
|
colorize_time_and_level: bool = True,
|
|
103
102
|
fmt: _Optional[str] = None,
|
|
104
|
-
datefmt: str =
|
|
103
|
+
datefmt: str = '%H:%M:%S',
|
|
105
104
|
style: str = '%',
|
|
106
105
|
handle_carriage_return: bool = True,
|
|
107
106
|
handle_new_line: bool = True,
|
|
@@ -209,7 +208,7 @@ def get_logging_window(
|
|
|
209
208
|
show_level: bool = True,
|
|
210
209
|
colorize_time_and_level: bool = True,
|
|
211
210
|
fmt: _Optional[str] = None,
|
|
212
|
-
datefmt: str =
|
|
211
|
+
datefmt: str = '%H:%M:%S',
|
|
213
212
|
style: str = '%',
|
|
214
213
|
handle_carriage_return: bool = True,
|
|
215
214
|
handle_new_line: bool = True,
|
|
@@ -421,7 +420,7 @@ def basic_config(
|
|
|
421
420
|
stream=None,
|
|
422
421
|
filename=None,
|
|
423
422
|
filemode: str = 'a',
|
|
424
|
-
date_format: str =
|
|
423
|
+
date_format: str = '%H:%M:%S',
|
|
425
424
|
style: str = '%',
|
|
426
425
|
format_: _Optional[str] = None,
|
|
427
426
|
level: _Optional[_Union[int, str]] = None
|
|
@@ -517,8 +516,8 @@ def basic_config(
|
|
|
517
516
|
if handler.formatter is None:
|
|
518
517
|
handler.setFormatter(formatter)
|
|
519
518
|
root.addHandler(handler)
|
|
520
|
-
|
|
521
|
-
|
|
519
|
+
if level is not None:
|
|
520
|
+
root.setLevel(level)
|
|
522
521
|
|
|
523
522
|
|
|
524
523
|
basicConfig = basic_config
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: log21
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.1
|
|
4
4
|
Summary: A simple logging package that helps you log colorized messages in Windows console.
|
|
5
5
|
Author-email: "CodeWriter21(Mehrad Pooryoussof)" <CodeWriter21@gmail.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -92,13 +92,12 @@ pip install git+https://github.com/MPCodeWriter21/log21
|
|
|
92
92
|
Changes
|
|
93
93
|
-------
|
|
94
94
|
|
|
95
|
-
### 2.8.
|
|
95
|
+
### 2.8.1
|
|
96
96
|
|
|
97
|
-
+
|
|
98
|
-
+
|
|
99
|
-
+ Added
|
|
100
|
-
+
|
|
101
|
-
+ Ability to add new methods to the Logger object for each custom level.
|
|
97
|
+
+ Fixed Carriage Return Handling.
|
|
98
|
+
+ Fixed setting level using `log21.basic_config`
|
|
99
|
+
+ Added more configuration for developer tools to the `pyproject.toml` file.
|
|
100
|
+
+ Added pre-commit.
|
|
102
101
|
|
|
103
102
|
[Full CHANGELOG](https://github.com/MPCodeWriter21/log21/blob/master/CHANGELOG.md)
|
|
104
103
|
|
|
@@ -237,7 +236,7 @@ for character in text:
|
|
|
237
236
|
|
|
238
237
|
window.error(colored_text)
|
|
239
238
|
|
|
240
|
-
# See more examples in
|
|
239
|
+
# See more examples in
|
|
241
240
|
# https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/LoggingWindow.py#L155
|
|
242
241
|
# and
|
|
243
242
|
# https://github.com/MPCodeWriter21/log21/blob/066efc1e72542531012d36974bbf6cd4c5941378/log21/__init__.py#L144
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|