mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
Configurable log level: ENV + cmd
This commit is contained in:
@@ -16,6 +16,7 @@ logger = logging.getLogger(__name__)
|
||||
def main():
|
||||
"""CLI entrypoint"""
|
||||
args = parse_args()
|
||||
log.setup(level=args.log_level)
|
||||
config = Config()
|
||||
containers = RunningContainers()
|
||||
|
||||
@@ -132,6 +133,12 @@ def parse_args():
|
||||
'action',
|
||||
choices=['status', 'backup', 'start-backup-process'],
|
||||
)
|
||||
parser.add_argument(
|
||||
'--log-level',
|
||||
default=None,
|
||||
choices=list(log.LOG_LEVELS.keys()),
|
||||
help="Log level"
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user