Fix logging in API

Setup log in API before first usage

Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
Martin Basti 2015-07-08 14:13:19 +02:00 committed by Tomas Babej
parent 7c0e7f7e3c
commit e51bb1bc66

View File

@ -372,11 +372,11 @@ class API(ReadOnly):
Initialize environment variables and logging.
"""
self.__doing('bootstrap')
self.env._bootstrap(**overrides)
self.env._finalize_core(**dict(DEFAULT_CONFIG))
self.log_mgr = log_mgr
log = log_mgr.root_logger
self.log = log
self.env._bootstrap(**overrides)
self.env._finalize_core(**dict(DEFAULT_CONFIG))
# Add the argument parser
if not parser: