Permalink
Browse files

improve logging

  • Loading branch information...
1 parent 0a3432b commit c5328ad205fe104a8daf36568170c138898c4838 @tantra35 committed Jan 30, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 pymodules/playrix/powerDNS/geowithloadbalancewithfailover.py
@@ -41,7 +41,6 @@ def __getdata(self):
def list(self, qtype, qdomain, dnspkt, domain_id):
- self.__m_loger.info("call from remote addr: " + dnspkt.getRemote());
l_domains = self.__getdata();
l_qtypeCode = qtype.getCode();
@@ -82,7 +81,12 @@ def list(self, qtype, qdomain, dnspkt, domain_id):
l_nearest_backet = l_default_backet;
if l_nearest_backet:
+ self.__m_loger.info("for client ip " + dnspkt.getRemote() + " find backet " + l_nearest_backet["name"]);
+
for l_ip in l_nearest_backet['ips']:
l_lookup_responce.append({'type': QType.A, 'content': l_ip, 'qname': qdomain, 'ttl': l_domain['ttl']});
+ else:
+ self.__m_loger.error("can't find any backet for client ip " + dnspkt.getRemote());
+
return l_lookup_responce;

0 comments on commit c5328ad

Please sign in to comment.