You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getLogger().info("⚙️ Error config logger - defaulting to INFO")
289
+
logger.setLevel(logging.INFO)
270
290
try:
271
291
ipv4_enabled=config["a"]
272
292
ipv6_enabled=config["aaaa"]
273
293
except:
274
294
ipv4_enabled=True
275
295
ipv6_enabled=True
276
-
print("⚙️ Individually disable IPv4 or IPv6 with new config.json options. Read more about it here: https://github.com/timothymiller/cloudflare-ddns/blob/master/README.md")
296
+
getLogger().info("⚙️ Individually disable IPv4 or IPv6 with new config.json options. Read more about it here: https://github.com/timothymiller/cloudflare-ddns/blob/master/README.md")
277
297
try:
278
298
purgeUnknownRecords=config["purgeUnknownRecords"]
279
299
except:
280
300
purgeUnknownRecords=False
281
-
print("⚙️ No config detected for 'purgeUnknownRecords' - defaulting to False")
301
+
getLogger().info("⚙️ No config detected for 'purgeUnknownRecords' - defaulting to False")
282
302
try:
283
303
ttl=int(config["ttl"])
284
304
except:
285
305
ttl=300# default Cloudflare TTL
286
-
print(
287
-
"⚙️ No config detected for 'ttl' - defaulting to 300 seconds (5 minutes)")
306
+
getLogger().info("⚙️ No config detected for 'ttl' - defaulting to 300 seconds (5 minutes)")
288
307
ifttl<30:
289
308
ttl=1#
290
-
print("⚙️ TTL is too low - defaulting to 1 (auto)")
309
+
getLogger().info("⚙️ TTL is too low - defaulting to 1 (auto)")
310
+
try:
311
+
timeout=int(config["timeout"])
312
+
except:
313
+
timeout=ttl
314
+
getLogger().info("⚙️ No config detected for 'timeout' - defaulting to %d seconds", timeout)
315
+
iftimeout<10:
316
+
timeout=10
317
+
getLogger().info("⚙️ Timeout is too low - defaulting to %d seconds", timeout)
291
318
if (len(sys.argv) >1):
292
319
if (sys.argv[1] =="--repeat"):
293
320
ifipv4_enabledandipv6_enabled:
294
-
print(
295
-
"🕰️ Updating IPv4 (A) & IPv6 (AAAA) records every "+str(ttl) +" seconds")
321
+
getLogger().info("🕰️ Updating IPv4 (A) & IPv6 (AAAA) records every "+str(ttl) +" seconds")
296
322
elifipv4_enabledandnotipv6_enabled:
297
-
print("🕰️ Updating IPv4 (A) records every "+
323
+
getLogger().info("🕰️ Updating IPv4 (A) records every "+
298
324
str(ttl) +" seconds")
299
325
elifipv6_enabledandnotipv4_enabled:
300
-
print("🕰️ Updating IPv6 (AAAA) records every "+
326
+
getLogger().info("🕰️ Updating IPv6 (AAAA) records every "+
0 commit comments