Set log level from config
This commit is contained in:
parent
bddea6355a
commit
fe17665682
@ -41,8 +41,7 @@ class CB:
|
||||
format='%(levelname)s:%(asctime)s - %(message)s',
|
||||
)
|
||||
self.log = logging.getLogger(PROG)
|
||||
# self.log.setLevel(logging.DEBUG)
|
||||
self.log.setLevel(logging.INFO)
|
||||
self.log.setLevel(self.log_level)
|
||||
self.info(f'Start {PROG}')
|
||||
|
||||
@contextlib.contextmanager
|
||||
@ -62,6 +61,8 @@ class CB:
|
||||
cfg.get('mkimage_profiles_git')
|
||||
)
|
||||
|
||||
self.log_level = getattr(logging, cfg.get('log_level', 'INFO').upper())
|
||||
|
||||
try:
|
||||
self._remote = os.path.expanduser(cfg['remote'])
|
||||
self.key = cfg['key']
|
||||
|
Loading…
x
Reference in New Issue
Block a user