mirror of
https://github.com/josegonzalez/python-github-backup.git
synced 2025-12-07 00:48:01 +01:00
Add --log-level command line argument
Support changing the log level to the desired value easily. For example, this is useful to suppress progress messages but keep logging warnings and errors.
This commit is contained in:
@@ -32,6 +32,11 @@ def main():
|
||||
if args.lfs_clone:
|
||||
check_git_lfs_install()
|
||||
|
||||
if args.log_level:
|
||||
log_level = logging.getLevelName(args.log_level.upper())
|
||||
if isinstance(log_level, int):
|
||||
logging.root.setLevel(log_level)
|
||||
|
||||
if not args.as_app:
|
||||
log_info('Backing up user {0} to {1}'.format(args.user, output_directory))
|
||||
authenticated_user = get_authenticated_user(args)
|
||||
|
||||
Reference in New Issue
Block a user