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
@@ -17,6 +17,8 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import logging
|
||||
|
||||
import six
|
||||
|
||||
from ipalib import api, errors, krb_utils
|
||||
@@ -54,6 +56,8 @@ EXAMPLES:
|
||||
ipa passwd tuser1
|
||||
""")
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
register = Registry()
|
||||
|
||||
# We only need to prompt for the current password when changing a password
|
||||
@@ -134,7 +138,8 @@ class passwd(Command):
|
||||
if principal == getattr(context, 'principal') and \
|
||||
current_password == MAGIC_VALUE:
|
||||
# No cheating
|
||||
self.log.warning('User attempted to change password using magic value')
|
||||
logger.warning('User attempted to change password using magic '
|
||||
'value')
|
||||
raise errors.ACIError(info=_('Invalid credentials'))
|
||||
|
||||
if current_password == MAGIC_VALUE:
|
||||
|
||||
Reference in New Issue
Block a user