summaryrefslogtreecommitdiffstats
path: root/ipapython/dogtag.py
diff options
context:
space:
mode:
authorJohn Dennis <jdennis@redhat.com>2011-11-15 14:39:31 -0500
committerMartin Kosek <mkosek@redhat.com>2011-11-23 09:36:18 +0100
commit56401c1abe7d4c78650acfcd9bbe8c8edc1dac57 (patch)
treea759f9fb51d4e2e110c55dbecc45f436386ee30f /ipapython/dogtag.py
parent730f1228a91ec9c6e575181807da2ab994a38071 (diff)
downloadfreeipa-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 'ipapython/dogtag.py')
-rw-r--r--ipapython/dogtag.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/ipapython/dogtag.py b/ipapython/dogtag.py
index c5317166a..20f2643b9 100644
--- a/ipapython/dogtag.py
+++ b/ipapython/dogtag.py
@@ -25,7 +25,7 @@ import nss.nss as nss
from nss.error import NSPRError
from ipalib.errors import NetworkError, CertificateOperationError
from urllib import urlencode
-import logging
+from ipapython.ipa_log_manager import *
def get_ca_certchain(ca_host=None):
"""
@@ -74,8 +74,8 @@ def https_request(host, port, url, secdir, password, nickname, **kw):
host = host.encode('utf-8')
uri = 'https://%s%s' % (ipautil.format_netloc(host, port), url)
post = urlencode(kw)
- logging.info('sslget %r', uri)
- logging.debug('sslget post %r', post)
+ root_logger.info('sslget %r', uri)
+ root_logger.debug('sslget post %r', post)
request_headers = {"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"}
try:
@@ -112,8 +112,8 @@ def http_request(host, port, url, **kw):
host = host.encode('utf-8')
uri = 'http://%s%s' % (ipautil.format_netloc(host, port), url)
post = urlencode(kw)
- logging.info('request %r', uri)
- logging.debug('request post %r', post)
+ root_logger.info('request %r', uri)
+ root_logger.debug('request post %r', post)
conn = httplib.HTTPConnection(host, port)
try:
conn.request('POST', url,
@@ -130,9 +130,9 @@ def http_request(host, port, url, **kw):
except NSPRError, e:
raise NetworkError(uri=uri, error=str(e))
- logging.debug('request status %d', http_status)
- logging.debug('request reason_phrase %r', http_reason_phrase)
- logging.debug('request headers %s', http_headers)
- logging.debug('request body %r', http_body)
+ root_logger.debug('request status %d', http_status)
+ root_logger.debug('request reason_phrase %r', http_reason_phrase)
+ root_logger.debug('request headers %s', http_headers)
+ root_logger.debug('request body %r', http_body)
return http_status, http_reason_phrase, http_headers, http_body