diff options
author | John Dennis <jdennis@redhat.com> | 2011-11-15 14:39:31 -0500 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-11-23 09:36:18 +0100 |
commit | 56401c1abe7d4c78650acfcd9bbe8c8edc1dac57 (patch) | |
tree | a759f9fb51d4e2e110c55dbecc45f436386ee30f /ipaserver/install/krbinstance.py | |
parent | 730f1228a91ec9c6e575181807da2ab994a38071 (diff) | |
download | freeipa-56401c1abe7d4c78650acfcd9bbe8c8edc1dac57.tar.gz freeipa-56401c1abe7d4c78650acfcd9bbe8c8edc1dac57.tar.xz freeipa-56401c1abe7d4c78650acfcd9bbe8c8edc1dac57.zip |
ticket 2022 - modify codebase to utilize IPALogManager, obsoletes logging
change default_logger_level to debug in configure_standard_logging
add new ipa_log_manager module, move log_mgr there, also export
root_logger from log_mgr.
change all log_manager imports to ipa_log_manager and change
log_manager.root_logger to root_logger.
add missing import for parse_log_level()
Diffstat (limited to 'ipaserver/install/krbinstance.py')
-rw-r--r-- | ipaserver/install/krbinstance.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ipaserver/install/krbinstance.py b/ipaserver/install/krbinstance.py index fa47e09ec..6ed385162 100644 --- a/ipaserver/install/krbinstance.py +++ b/ipaserver/install/krbinstance.py @@ -18,7 +18,6 @@ # import shutil -import logging import fileinput import re import sys @@ -33,6 +32,7 @@ from ipapython import ipautil from ipapython import services as ipaservices from ipalib import util from ipalib import errors +from ipapython.ipa_log_manager import * from ipaserver import ipaldap from ipaserver.install import replication @@ -221,7 +221,7 @@ class KrbInstance(service.Service): try: self.start() except: - logging.critical("krb5kdc service failed to start") + root_logger.critical("krb5kdc service failed to start") def __setup_sub_dict(self): self.sub_dict = dict(FQDN=self.fqdn, @@ -245,10 +245,10 @@ class KrbInstance(service.Service): try: self.admin_conn.delete_s(r.dn) except LDAPError, e: - logging.critical("Error during SASL mapping removal: %s" % str(e)) + root_logger.critical("Error during SASL mapping removal: %s" % str(e)) raise e except LDAPError, e: - logging.critical("Error while enumerating SASL mappings %s" % str(e)) + root_logger.critical("Error while enumerating SASL mappings %s" % str(e)) raise e entry = ipaldap.Entry("cn=Full Principal,cn=mapping,cn=sasl,cn=config") @@ -261,7 +261,7 @@ class KrbInstance(service.Service): try: self.admin_conn.add_s(entry) except ldap.ALREADY_EXISTS: - logging.critical("failed to add Full Principal Sasl mapping") + root_logger.critical("failed to add Full Principal Sasl mapping") raise e entry = ipaldap.Entry("cn=Name Only,cn=mapping,cn=sasl,cn=config") @@ -274,7 +274,7 @@ class KrbInstance(service.Service): try: self.admin_conn.add_s(entry) except ldap.ALREADY_EXISTS: - logging.critical("failed to add Name Only Sasl mapping") + root_logger.critical("failed to add Name Only Sasl mapping") raise e def __add_krb_container(self): @@ -342,7 +342,7 @@ class KrbInstance(service.Service): entry = self.admin_conn.getEntry(self.get_realm_suffix(), ldap.SCOPE_SUBTREE) except errors.NotFound, e: - logging.critical("Could not find master key in DS") + root_logger.critical("Could not find master key in DS") raise e krbMKey = pyasn1.codec.ber.decoder.decode(entry.krbmkey) @@ -356,7 +356,7 @@ class KrbInstance(service.Service): fd.write(s) fd.close() except os.error, e: - logging.critical("failed to write stash file") + root_logger.critical("failed to write stash file") raise e #add the password extop module @@ -445,7 +445,7 @@ class KrbInstance(service.Service): try: self.fstore.restore_file(f) except ValueError, error: - logging.debug(error) + root_logger.debug(error) pass if not enabled is None and not enabled: |