mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-10 04:58:03 -05:00
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:
committed by
Martin Basti
parent
7a482b7c72
commit
07229c8ff6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user