Skip to content

Commit 5875f09

Browse files
committed
Change log format, add inbound ip to question log
1 parent d6b1c6d commit 5875f09

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/inbound/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (s *Server) ServeDNS(w dns.ResponseWriter, q *dns.Msg) {
4949
s.Dispatcher.InboundIP = inboundIP
5050
s.Dispatcher.QuestionMessage = q
5151

52-
log.Debug("Question: " + q.Question[0].String())
52+
log.Debug("Question from " +inboundIP + ": " + q.Question[0].String())
5353

5454
for _, qt := range s.RejectQtype {
5555
if isQuestionType(q, qt) {

core/outbound/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (c *Client) logAnswer(indicator string) {
232232
} else {
233233
name = c.DNSUpstream.Name
234234
}
235-
log.Debug(name + " Answer: " + a.String())
235+
log.Debug("Answer from " + name + ": " + a.String())
236236
}
237237
}
238238

0 commit comments

Comments
 (0)