Changeset 137 for trunk/pdns/pdns/pdns_recursor.cc
- Timestamp:
- 01/16/03 18:24:36 (10 years ago)
- Files:
-
- 1 modified
-
trunk/pdns/pdns/pdns_recursor.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/pdns_recursor.cc
r135 r137 157 157 R->setRA(true); 158 158 159 SyncRes <LWRes>sr;160 L<<Logger::Error<<"["<<MT.getTid()<<"] new question arrivedfor '"<<P.qdomain<<"|"<<P.qtype.getName()<<"' from "<<P.getRemote()<<endl;159 SyncRes sr; 160 L<<Logger::Error<<"["<<MT.getTid()<<"] question for '"<<P.qdomain<<"|"<<P.qtype.getName()<<"' from "<<P.getRemote()<<endl; 161 161 sr.setId(MT.getTid()); 162 162 if(!P.d.rd) … … 174 174 const char *buffer=R->getData(); 175 175 sendto(d_serversock,buffer,R->len,0,(struct sockaddr *)(R->remote),R->d_socklen); 176 L<<Logger::Error<<"["<<MT.getTid()<<"] sent answer to "<<(P.d.rd?"":"non-rd ")<<"question for '"<<P.qdomain<<"|"<<P.qtype.getName()<<"' to "<<P.getRemote();177 L<<" , "<<ntohs(R->d.ancount)<<" answers, "<<ntohs(R->d.arcount)<<" additional, took "<<sr.d_outqueries<<" packets"<<endl;176 L<<Logger::Error<<"["<<MT.getTid()<<"] answer to "<<(P.d.rd?"":"non-rd ")<<"question '"<<P.qdomain<<"|"<<P.qtype.getName(); 177 L<<"': "<<ntohs(R->d.ancount)<<" answers, "<<ntohs(R->d.arcount)<<" additional, took "<<sr.d_outqueries<<" packets, rcode="<<res<<endl; 178 178 delete R; 179 179 } … … 264 264 L<<Logger::Error<<"stats: "<<qcounter<<" questions, "<<cache.size()<<" cache entries, " 265 265 <<(int)((cacheHits*100.0)/(cacheHits+cacheMisses))<<"% cache hits"; 266 L<<Logger::Error<<", outpacket/query ratio "<<(int)(SyncRes <LWRes>::s_outqueries*100.0/SyncRes<LWRes>::s_queries)<<"%"<<endl;266 L<<Logger::Error<<", outpacket/query ratio "<<(int)(SyncRes::s_outqueries*100.0/SyncRes::s_queries)<<"%"<<endl; 267 267 } 268 268 last_stat=time(0); 269 269 } 270 270 if(time(0)-last_rootupdate>7200) { 271 SyncRes <LWRes>sr;271 SyncRes sr; 272 272 vector<DNSResourceRecord>ret; 273 273 … … 291 291 arg().set("local-port","port to listen on")="5300"; 292 292 arg().set("local-address","port to listen on")="0.0.0.0"; 293 arg().set("trace","if we should output heaps of logging")=" true";293 arg().set("trace","if we should output heaps of logging")="off"; 294 294 arg().set("daemon","Operate as a daemon")="no"; 295 295 … … 300 300 301 301 if(arg().mustDo("trace")) 302 SyncRes <LWRes>::setLog(true);302 SyncRes::setLog(true); 303 303 304 304 makeClientSocket();