Add debug logging #23
1 changed files with 4 additions and 3 deletions
7
query.go
7
query.go
|
@ -25,7 +25,7 @@ func doQuery(c *cli.Context) error {
|
|||
resp.Logger = util.InitLogger(c.Bool("debug")) //init logger
|
||||
resp.Answers, err = parseArgs(c.Args().Slice())
|
||||
if err != nil {
|
||||
resp.Logger.Error("Unable to parse args")
|
||||
resp.Logger.Error("unable to parse args")
|
||||
return err
|
||||
}
|
||||
port := c.Int("port")
|
||||
|
@ -82,7 +82,7 @@ func doQuery(c *cli.Context) error {
|
|||
}
|
||||
// Set the zero flag if requested (does nothing)
|
||||
if c.Bool("z") {
|
||||
resp.Logger.Debug("Setting message to zero")
|
||||
resp.Logger.Debug("setting message to zero")
|
||||
msg.Zero = true
|
||||
}
|
||||
// Disable DNSSEC validation
|
||||
|
@ -99,7 +99,7 @@ func doQuery(c *cli.Context) error {
|
|||
}
|
||||
// Set DNSSEC if requested
|
||||
if c.Bool("dnssec") {
|
||||
resp.Logger.Debug("Using DNSSEC")
|
||||
resp.Logger.Debug("using DNSSEC")
|
||||
msg.SetEdns0(1232, true)
|
||||
}
|
||||
|
||||
|
@ -152,6 +152,7 @@ func doQuery(c *cli.Context) error {
|
|||
case c.Bool("6"):
|
||||
d.Net += "6"
|
||||
}
|
||||
resp.Logger.Debug("exchanging DNS message")
|
||||
in, resp.Answers.RTT, err = d.Exchange(msg, resp.Answers.Server)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue