Added Logger + Fixed Code + README and README_IT

This commit is contained in:
2026-03-14 10:53:52 +00:00
parent 0877e07e76
commit 83a65ab26e
10 changed files with 786 additions and 119 deletions

View File

@@ -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()