]> git.ipfire.org Git - people/arne_f/ipfire-2.x.git/commitdiff
updxlrator: show hostaddr in debuglog
authorJustin Luth <justin_luth@sil.org>
Sat, 30 Dec 2017 05:48:37 +0000 (08:48 +0300)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 7 Jan 2018 19:49:47 +0000 (19:49 +0000)
There is nowhere in the debuglog any indication of
which client is requesting the file that updxlrator
is providing (or caching). Especially for those
huge Windows 10 downloads, it is valuable to
see which client is requesting them, especially
when the same client requests the same download
multiple times a second.

This only impacts users who turn on debugging.

Signed-off-by: Justin Luth <jluth@mail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/updxlrator/updxlrator

index bc98786385e33f275ca5600c01920d9cbca991ec..ff23b3a95184e2843668a9e18263efed4aaa2e95 100644 (file)
@@ -399,7 +399,7 @@ sub check_cache
           )
        {
                &debuglog("File exists in cache and is up to date");
-               &debuglog("Retrieving file from cache ($updsource)");
+               &debuglog("Retrieving file from cache ($updsource) for $hostaddr");
                &setcachestatus("$updcachedir/$vendorid/$uuid/access.log",time);
                $cacheurl="http://$netsettings{'GREEN_ADDRESS'}:$http_port/updatecache/$vendorid/$uuid/$updfile";
        }
@@ -427,7 +427,7 @@ sub check_cache
                &debuglog("Free disk space: " . &diskfree($updcachedir));
                &debuglog("Disk usage: " . &diskusage($updcachedir) . "% (max. $maxusage%)");
                if (-e "$updcachedir/download/$vendorid/$updfile") { &debuglog("File download/$vendorid/$updfile exists"); }
-               &debuglog("Retrieving file from source ($updsource)");
+               &debuglog("Retrieving file from source ($updsource) for $hostaddr");
                if ((!$passive_mode) && (&diskusage($updcachedir) <= $maxusage) && ($remote_size <= &diskfree($updcachedir)) && (!-e "$updcachedir/download/$vendorid/$updfile"))
                {
                        &debuglog("Running command $nice$apphome/bin/download $vendorid $sourceurl $cfmirror &");