freemyip: Improve log messages

This commit is contained in:
Richard Hansen 2024-07-21 22:53:01 -04:00
parent b3006dd6c6
commit c53f40d205

View file

@ -6416,12 +6416,11 @@ sub nic_freemyip_update {
debug("\nnic_freemyip_update -------------------");
for my $h (@_) {
my $ip = delete $config{$h}{'wantip'};
info("setting IP address to %s for %s", $ip, $h);
verbose("UPDATE:", "updating %s", $h);
info("$h: setting IP address to $ip");
my $url = "https://$config{$h}{'server'}/update?token=$config{$h}{'password'}&domain=$h";
my $reply = geturl(proxy => opt('proxy'), url => $url);
if (!defined($reply) || !$reply) {
failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'});
failed("$h: Request to $config{$h}{'server'} failed");
next;
}
next if !header_ok($h, $reply);
@ -6431,10 +6430,10 @@ sub nic_freemyip_update {
$config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now;
$config{$h}{'status'} = 'good';
success("updating %s: good: IP address set to %s", $h, $ip);
success("$h: good: IP address set to $ip");
} else {
$config{$h}{'status'} = 'failed';
failed("updating %s: Server said: '%s'", $h, $returned);
failed("$h: Server said: $returned");
}
}
}