Skip to content

Commit

Permalink
rework noisy dns log (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Dec 8, 2023
1 parent b11e1a0 commit f6af100
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,13 @@ import pekko.pattern.{ BackoffOpts, BackoffSupervisor }
msg.id,
msg.questions.mkString(","),
orig.questions.mkString(","))
case Some((_, orig)) =>
log.warning("DNS response id {} question [{}] question asked [{}]",
msg.id,
msg.questions.mkString(","),
orig.questions.mkString(","))
case Some((_, _)) =>
if (log.isDebugEnabled) {
log.debug("DNS response id {} has response code {}: question [{}]",
msg.id,
msg.flags.responseCode,
msg.questions.mkString(","))
}
val (recs, additionalRecs) =
if (msg.flags.responseCode == ResponseCode.SUCCESS) (msg.answerRecs, msg.additionalRecs) else (Nil, Nil)
self ! Answer(msg.id, recs, additionalRecs)
Expand Down

0 comments on commit f6af100

Please sign in to comment.