2017-10-25 21:47:33 -07:00
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 21:58:50 -07:00
|
|
|
VERBOSITY_SOME = 1
|
|
|
|
|
VERBOSITY_LOTS = 2
|
2017-10-25 21:47:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def verbosity_to_log_level(verbosity):
|
|
|
|
|
'''
|
|
|
|
|
Given a borgmatic verbosity value, return the corresponding Python log level.
|
|
|
|
|
'''
|
|
|
|
|
return {
|
|
|
|
|
VERBOSITY_SOME: logging.INFO,
|
|
|
|
|
VERBOSITY_LOTS: logging.DEBUG,
|
|
|
|
|
}.get(verbosity, logging.ERROR)
|