logging: do not use ipa_log_manager to create module-level loggers

Replace all `ipa_log_manager.log_mgr.get_logger` calls to create
module-level loggers with `logging.getLogger` calls and deprecate
`ipa_log_manager.log_mgr.get_logger`.

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Jan Cholasta
2017-07-14 15:55:59 +02:00
committed by Martin Basti
parent 7a482b7c72
commit 07229c8ff6
14 changed files with 103 additions and 98 deletions
+5
View File
@@ -94,6 +94,11 @@ class _DeprecatedLogger(object):
def get_logger(who, bind_logger_names=False):
if isinstance(who, six.string_types):
warnings.warn(
"{}.log_mgr.get_logger is deprecated, use "
"logging.getLogger".format(__name__),
DeprecationWarning)
logger_name = who
else:
caller_globals = sys._getframe(1).f_globals