Skip to content

Commit

Permalink
various: m logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Sep 28, 2024
1 parent a033776 commit 71bf7a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/core/io-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,13 @@ export default class IOState {
}

logDnsPkt() {
if (this.isProd) return;
this.log.d(
"domains",
dnsutil.extractDomains(this.decodedDnsPacket),
dnsutil.getQueryType(this.decodedDnsPacket) || "",
"data",
dnsutil.getInterestingAnswerData(this.decodedDnsPacket),
"ttl",
dnsutil.ttl(this.decodedDnsPacket)
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/dns-op/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export default class DNSResolver {
// check outgoing cached dns-packet against blocklists
this.blocker.blockAnswer(rxid, /* out*/ r, blInfo);
const fromCache = cacheutil.hasCacheHeader(res.headers);
this.log.d(rxid, "ans block?", r.isBlocked, "from cache?", fromCache);
this.log.d(rxid, "ansblock?", r.isBlocked, "fromcache?", fromCache);

// if res was got from caches or if res was got from max doh (ie, blf
// wasn't used to retrieve stamps), then skip hydrating the cache
Expand Down Expand Up @@ -311,7 +311,7 @@ export default class DNSResolver {
this.log.d(rxid, "primeCache: block?", blocked, "k", k.href);

if (!k) {
this.log.d(rxid, "no cache-key, url/query missing?", k, r.stamps);
this.log.d(rxid, "primeCache: no key, url/query missing?", k, r.stamps);
return;
}

Expand Down

0 comments on commit 71bf7a0

Please sign in to comment.