Skip to content

Commit 125a69e

Browse files
committed
complete rename from verbose to trace
Signed-off-by: Zen <[email protected]>
1 parent 7f0780b commit 125a69e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "zenlib"
7-
version = "2.1.0"
7+
version = "2.1.1"
88
authors = [
99
{ name="Desultory", email="[email protected]" },
1010
]

src/zenlib/util/main_funcs.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
Functions to help with the main()
33
"""
44

5-
__version__ = '1.1.0'
5+
__version__ = '1.1.1'
66
__author__ = 'desultory'
77

88

9-
BASE_ARGS = [{'flags': ['-d', '--debug'], 'action': 'store_true', 'help': 'Debug mode.'},
10-
{'flags': ['-dd', '--trace'], 'action': 'store_true', 'help': 'Trace debug mode.'},
11-
{'flags': ['-v', '--version'], 'action': 'store_true', 'help': 'Print the version and exit.'},
12-
{'flags': ['--log-file'], 'type': str, 'help': 'Log file path.'},
13-
{'flags': ['--log-level'], 'type': str, 'help': 'Log level.'},
14-
{'flags': ['--log-time'], 'action': 'store_true', 'help': 'Log timestamps.'},
15-
{'flags': ['--no-log-color'], 'action': 'store_true', 'help': 'Disable log color.'}]
9+
BASE_ARGS = [{'flags': ['-d', '--debug'], 'action': 'store_true', 'help': 'enable debug mode (level 10)'},
10+
{'flags': ['-dd', '--trace'], 'action': 'store_true', 'help': 'enable trace debug mode (level 5)'},
11+
{'flags': ['-v', '--version'], 'action': 'store_true', 'help': 'print the version and exit'},
12+
{'flags': ['--log-file'], 'type': str, 'help': 'set the path to the log file'},
13+
{'flags': ['--log-level'], 'type': str, 'help': 'set the log level'},
14+
{'flags': ['--log-time'], 'action': 'store_true', 'help': 'enable log timestamps'},
15+
{'flags': ['--no-log-color'], 'action': 'store_true', 'help': 'disable log color'}]
1616

1717

1818
def get_kwargs_from_args(args, logger=None, base_kwargs={}, drop_base=True):
@@ -23,7 +23,7 @@ def get_kwargs_from_args(args, logger=None, base_kwargs={}, drop_base=True):
2323
kwargs['logger'] = logger
2424

2525
for arg in vars(args):
26-
if drop_base and arg in ['debug', 'verbose', 'version', 'log_file', 'log_level', 'log_time', 'no_log_color']:
26+
if drop_base and arg in ['debug', 'trace', 'version', 'log_file', 'log_level', 'log_time', 'no_log_color']:
2727
continue
2828
value = getattr(args, arg)
2929

@@ -62,7 +62,7 @@ def process_args(argparser, logger=None):
6262
if logger:
6363
if args.log_level is not None:
6464
log_level = int(args.log_level)
65-
elif args.verbose:
65+
elif args.trace:
6666
log_level = 5
6767
elif args.debug:
6868
log_level = 10

0 commit comments

Comments
 (0)