A wrapper script for Borg backup software that creates and prunes backups
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 satır
388B

  1. import logging
  2. VERBOSITY_WARNING = 0
  3. VERBOSITY_SOME = 1
  4. VERBOSITY_LOTS = 2
  5. def verbosity_to_log_level(verbosity):
  6. '''
  7. Given a borgmatic verbosity value, return the corresponding Python log level.
  8. '''
  9. return {
  10. VERBOSITY_WARNING: logging.WARNING,
  11. VERBOSITY_SOME: logging.INFO,
  12. VERBOSITY_LOTS: logging.DEBUG,
  13. }.get(verbosity, logging.WARNING)