File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,11 @@ import (
26
26
"reflect"
27
27
"sync"
28
28
"time"
29
+ "github.com/op/go-logging"
29
30
)
30
31
32
+ var logger = logging .MustGetLogger ("cfdnsupdater.updater" )
33
+
31
34
type DomainUpdater struct {
32
35
domain string
33
36
recordTypes core.RecordTypeSlice
@@ -133,9 +136,10 @@ SLEEP_PERIOD:
133
136
zoneDetail .Name , recordDetail .Type , recordDetail .Name )
134
137
recordIp := net .ParseIP (recordDetail .Content )
135
138
recordType , convertErr := core .FromString (recordDetail .Type )
139
+
136
140
if ! reflect .DeepEqual (recordIp , publicIP ) && convertErr == nil &&
137
- (len (self .recordTypes ) == 0 || ( self .recordTypes .Contains (recordType ) )) &&
138
- (len (self .recordNames ) == 0 || ! utils .StringInSlice (recordDetail .Name ,
141
+ (len (self .recordTypes ) == 0 || self .recordTypes .Contains (recordType )) &&
142
+ (len (self .recordNames ) == 0 || utils .StringInSlice (recordDetail .Name ,
139
143
self .recordNames )) {
140
144
logger .Debugf ("%s: Record %s:'%s' needs to be updated" ,
141
145
self .domain , recordDetail .Type , recordDetail .Name )
You can’t perform that action at this time.
0 commit comments