mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
logging: remove object-specific loggers
Remove all object-specific loggers, with the exception of `Plugin.log`, which is now deprecated. Replace affected logger calls with module-level logger calls. Deprecate object-specific loggers in `ipa_log_manager.get_logger`. Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
9d19654cbd
commit
ffadcb0414
@@ -21,6 +21,8 @@
|
||||
Joining an IPA domain
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
import six
|
||||
|
||||
from ipalib import Registry, api
|
||||
@@ -32,6 +34,8 @@ from ipaserver.install import installutils
|
||||
if six.PY3:
|
||||
unicode = str
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
register = Registry()
|
||||
|
||||
|
||||
@@ -100,16 +104,16 @@ class join(Command):
|
||||
dn = attrs_list['dn']
|
||||
|
||||
# No error raised so far means that host entry exists
|
||||
self.log.info('Host entry for %s already exists, '
|
||||
'joining may fail on the client side '
|
||||
'if not forced', hostname)
|
||||
logger.info('Host entry for %s already exists, '
|
||||
'joining may fail on the client side '
|
||||
'if not forced', hostname)
|
||||
|
||||
# If no principal name is set yet we need to try to add
|
||||
# one.
|
||||
if 'krbprincipalname' not in attrs_list:
|
||||
service = "host/%s@%s" % (hostname, api.env.realm)
|
||||
api.Command['host_mod'](hostname, krbprincipalname=service)
|
||||
self.log.info('No principal set, setting to %s', service)
|
||||
logger.info('No principal set, setting to %s', service)
|
||||
|
||||
# It exists, can we write the password attributes?
|
||||
allowed = ldap.can_write(dn, 'krblastpwdchange')
|
||||
|
||||
Reference in New Issue
Block a user