go update
This commit is contained in:
parent
c7ffc9adc7
commit
c228c32f6c
5 changed files with 545 additions and 1150 deletions
|
|
@ -209,14 +209,16 @@ func log_RR(enc zapcore.ObjectEncoder, rr dns.RR) {
|
|||
|
||||
func log_libdns_record(record *libdns.Record) zapcore.ObjectMarshaler {
|
||||
f := func(enc zapcore.ObjectEncoder) error {
|
||||
enc.AddString("ID", record.ID)
|
||||
enc.AddString("type", record.Type)
|
||||
enc.AddString("name", record.Name)
|
||||
enc.AddString("value", record.Value)
|
||||
enc.AddString("TTL", record.TTL.String())
|
||||
if record.Priority != 0 {
|
||||
enc.AddInt("priority", record.Priority)
|
||||
}
|
||||
// enc.AddString("ID", (*record).RR().ID)
|
||||
enc.AddString("type", (*record).RR().Type)
|
||||
enc.AddString("name", (*record).RR().Name)
|
||||
enc.AddString("TTL", (*record).RR().TTL.String())
|
||||
enc.AddString("data", (*record).RR().Data)
|
||||
/*
|
||||
if record.Priority != 0 {
|
||||
enc.AddInt("priority", record.Priority)
|
||||
}
|
||||
*/
|
||||
return nil
|
||||
}
|
||||
return zapcore.ObjectMarshalerFunc(f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue