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.

verbosity.py 320B

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