mirror of
https://github.com/niess/python-appimage.git
synced 2026-03-14 04:10:15 +01:00
Use a named logger
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import argparse
|
||||
from importlib import import_module
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -24,9 +23,9 @@ def main():
|
||||
dest='command')
|
||||
|
||||
parser.add_argument('-q', '--quiet', help='disable logging',
|
||||
dest='verbosity', action='store_const', const=logging.ERROR)
|
||||
dest='verbosity', action='store_const', const='ERROR')
|
||||
parser.add_argument('-v', '--verbose', help='print extra information',
|
||||
dest='verbosity', action='store_const', const=logging.DEBUG)
|
||||
dest='verbosity', action='store_const', const='DEBUG')
|
||||
|
||||
install_parser = subparsers.add_parser('install',
|
||||
description='Install binary dependencies')
|
||||
@@ -89,7 +88,8 @@ def main():
|
||||
|
||||
# Configure the verbosity
|
||||
if args.verbosity:
|
||||
logging.getLogger().setLevel(args.verbosity)
|
||||
from .utils import log
|
||||
log.set_level(args.verbosity)
|
||||
|
||||
# check if no arguments are passed
|
||||
if args.command is None:
|
||||
|
||||
Reference in New Issue
Block a user