mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-09-28 06:35:24 +00:00
Propagate log level to parent container
This commit is contained in:
@@ -17,10 +17,14 @@ logger = logging.getLogger(__name__)
|
|||||||
def main():
|
def main():
|
||||||
"""CLI entrypoint"""
|
"""CLI entrypoint"""
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
log.setup(level=args.log_level)
|
|
||||||
config = Config()
|
config = Config()
|
||||||
|
log.setup(level=args.log_level or config.log_level)
|
||||||
containers = RunningContainers()
|
containers = RunningContainers()
|
||||||
|
|
||||||
|
# Ensure log level is propagated to parent container if overridden
|
||||||
|
if args.log_level:
|
||||||
|
containers.this_container.set_config_env('LOG_LEVEL', args.log_level)
|
||||||
|
|
||||||
if args.action == 'status':
|
if args.action == 'status':
|
||||||
status(config, containers)
|
status(config, containers)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user