aboutsummaryrefslogtreecommitdiff
path: root/rpki/http.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-05-28 18:12:39 +0000
committerRob Austein <sra@hactrn.net>2014-05-28 18:12:39 +0000
commit937db24e600d3b29d780575120250e47980de901 (patch)
tree684b40de5b92863085194be0fbe9cc6dfc0658fe /rpki/http.py
parentdad61b8efaca22afd13e452f618a74f1d50dbb38 (diff)
Whack all logging calls to use per-module logger objects.
svn path=/trunk/; revision=5837
Diffstat (limited to 'rpki/http.py')
-rw-r--r--rpki/http.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/rpki/http.py b/rpki/http.py
index 4436a993..812f45b2 100644
--- a/rpki/http.py
+++ b/rpki/http.py
@@ -36,6 +36,8 @@ import rpki.exceptions
import rpki.log
import rpki.POW
+logger = logging.getLogger(__name__)
+
## @var rpki_content_type
# HTTP content type used for all RPKI messages.
rpki_content_type = "application/x-rpki"
@@ -978,7 +980,7 @@ def client(msg, url, callback, errback):
raise rpki.exceptions.BadClientURL, "Unusable URL %s" % url
if debug_http:
- rpki.log.debug("Contacting %s" % url)
+ logger.debug("Contacting %s" % url)
request = http_request(
cmd = "POST",
@@ -992,7 +994,7 @@ def client(msg, url, callback, errback):
hostport = (u.hostname or "localhost", u.port or default_tcp_port)
if debug_http:
- rpki.log.debug("Created request %r for %s" % (request, addr_to_string(hostport)))
+ logger.debug("Created request %r for %s" % (request, addr_to_string(hostport)))
if hostport not in client_queues:
client_queues[hostport] = http_queue(hostport)
client_queues[hostport].request(request)
@@ -1001,7 +1003,7 @@ def client(msg, url, callback, errback):
# pending I/O events, in case connections have closed.
if debug_http:
- rpki.log.debug("Scheduling connection startup for %r" % request)
+ logger.debug("Scheduling connection startup for %r" % request)
rpki.async.event_defer(client_queues[hostport].restart)
def server(handlers, port, host = ""):