From 95a10e2595e560469cc038eac920250880b3ce7f Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 26 Jul 2024 19:55:02 -0400 Subject: [PATCH] dslreports1: Log message improvements --- ddclient.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ddclient.in b/ddclient.in index 679d3aa..b031a1a 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4243,8 +4243,7 @@ sub nic_dslreports1_update { ## update each configured host 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; $url = "https://$config{$h}{'server'}/nic/"; @@ -4260,7 +4259,7 @@ sub nic_dslreports1_update { password => $config{$h}{'password'}, ) // ''; if ($reply eq '') { - failed("updating %s: Could not connect to %s.", $h, $config{$h}{'server'}); + failed("$h: request to $config{$h}{'server'} failed"); next; } @@ -4272,15 +4271,13 @@ sub nic_dslreports1_update { if ($return_code !~ /NOERROR/) { $config{$h}{'status'} = 'failed'; - warning("SENT: %s", $url) unless opt('verbose'); - warning("REPLIED: %s", $reply); - failed("updating %s", $h); + failed("$h: $reply"); } else { $config{$h}{'ip'} = $ip; $config{$h}{'mtime'} = $now; $config{$h}{'status'} = 'good'; - success("updating %s: %s: IP address set to %s", $h, $return_code, $ip); + success("$h: $return_code: IP address set to $ip"); } } }