Propagate log level to parent container
This commit is contained in:
parent
1978ee5946
commit
fdfb28fc47
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue