Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: src/miniFakeDns.py

Issue 6474028: [MiniFakeDns] Translate logging, reduce verbosity in INFO logs (Closed) Base URL: http://git.chromium.org/git/minifakedns.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/miniFakeDns.py
diff --git a/src/miniFakeDns.py b/src/miniFakeDns.py
index f1358d804ae73cbe728dd5aa22847d74b70c8562..04c08e5ad724e6386133603352374d86301b0798 100755
--- a/src/miniFakeDns.py
+++ b/src/miniFakeDns.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import socket, threading, time
+import logging, socket, threading, time
class DNSQuery:
TYPE = '\x00\x01' # An 'A' record
@@ -76,14 +76,14 @@ class DNSServer:
stopper.set()
"""
self._udps.bind((self._address, self._port))
- print 'miniFakeDns listening on port %d' % self._port
+ logging.info('miniFakeDns listening on port %d' % self._port)
self._udps.settimeout(1)
while not stop.is_set():
try:
data, addr = self._udps.recvfrom(1500)
p=DNSQuery(data)
self._udps.sendto(p.respuesta(self._fake_ip), addr)
- print 'Respuesta: %s -> %s' % (p.dominio, self._fake_ip)
+ logging.debug('Response: %s -> %s' % (p.dominio, self._fake_ip))
except socket.timeout:
pass
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698