Added Logger + Fixed Code + README and README_IT
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
#!/bin/python3
|
||||
import argparse
|
||||
|
||||
# configure logging first (logger reads config.json located next to this file)
|
||||
from logger import setup_logger
|
||||
setup_logger()
|
||||
|
||||
import logging
|
||||
# ora importiamo le funzioni (che useranno logging invece di print)
|
||||
from functions import *
|
||||
|
||||
default_backup_dir()
|
||||
@@ -18,9 +25,7 @@ elif args.debug:
|
||||
backups_now(debug="on")
|
||||
elif args.check:
|
||||
checked = check_existing_folders(debug="on")
|
||||
#print(checked)
|
||||
elif args.rotate:
|
||||
# passa il flag dry al chiamante; default è delete se non specifichi --dry
|
||||
autorotate_backups(dry_run=args.dry)
|
||||
else:
|
||||
backups_now()
|
||||
|
||||
Reference in New Issue
Block a user