From: Justin Luth <jluth@mail.com>
To: development@lists.ipfire.org
Subject: [PATCH] updxlrator: show hostaddr in debuglog
Date: Sat, 30 Dec 2017 10:41:59 +0300 [thread overview]
Message-ID: <6bd47129-c3da-98db-440e-8c6397f67e1c@mail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]
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(a)mail.com>
---
config/updxlrator/updxlrator | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/updxlrator/updxlrator b/config/updxlrator/updxlrator
index b728902f6..5baaaae58 100644
--- a/config/updxlrator/updxlrator
+++ b/config/updxlrator/updxlrator
@@ -397,7 +397,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";
}
@@ -414,7 +414,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 &");
--
2.14.1
next reply other threads:[~2017-12-30 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-30 7:41 Justin Luth [this message]
2017-12-30 14:29 ` Michael Tremer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6bd47129-c3da-98db-440e-8c6397f67e1c@mail.com \
--to=jluth@mail.com \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox