feat: add configurable log level
This commit is contained in:
parent
ef0620ee41
commit
5640899198
2 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
loglevel: "INFO" # optional
|
||||
stacks:
|
||||
- dir: /path/to/first-repo
|
||||
- dir: /path/to/second-repo
|
||||
|
|
3
dc-ops
3
dc-ops
|
@ -18,7 +18,8 @@ with configfile.open("r") as f:
|
|||
cfg = yaml.safe_load(f.read())
|
||||
|
||||
# init logging
|
||||
log.basicConfig(format="%(message)s", level=log.INFO)
|
||||
loglevel = cfg.get("loglevel", "INFO").upper()
|
||||
log.basicConfig(format="%(message)s", level=loglevel)
|
||||
|
||||
# iterate all stacks
|
||||
for stack in cfg["stacks"]:
|
||||
|
|
Loading…
Reference in a new issue