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 /install/tools/ipa-managed-entries | |
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 'install/tools/ipa-managed-entries')
-rwxr-xr-x | install/tools/ipa-managed-entries | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/install/tools/ipa-managed-entries b/install/tools/ipa-managed-entries index 92f02ef5..24ba0e76 100755 --- a/install/tools/ipa-managed-entries +++ b/install/tools/ipa-managed-entries @@ -29,7 +29,8 @@ try: from ipaserver.plugins.ldap2 import ldap2 from ipalib import api, errors from ipalib.dn import * - import logging + from ipapython.ipa_log_manager import * + except ImportError: print >> sys.stderr, """\ There was a problem importing one of the required Python modules. The @@ -75,11 +76,8 @@ def get_dirman_password(): def main(): retval = 0 - loglevel = logging.ERROR def_dn = None options, args = parse_options() - if options.debug: - loglevel = logging.DEBUG if options.list_managed_entries: pass @@ -87,8 +85,7 @@ def main(): sys.exit("You must specify an action, either status, enable or disable") elif args[0] != "enable" and args[0] != "disable" and args[0] != "status": sys.exit("Unrecognized action [" + args[0] + "]") - logging.basicConfig(level=loglevel, - format='%(levelname)s %(message)s') + standard_logging_setup(None, debug=options.debug) host = installutils.get_fqdn() api.bootstrap(context='cli', debug=options.debug) |