summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2005-08-30 14:38:35 +0200
committerNiko Tyni <ntyni@iki.fi>2005-08-30 14:38:35 +0200
commit04e1ef4cd80ad08455452d56aa4b953ed3a53057 (patch)
tree17be1e4b6a35f23cd56b79d5a9cfc593ddf8163f /lib
parentfcaa98c7edf28d8d16ff3f970460d2a0bcbd409d (diff)
downloadsmokeping-04e1ef4cd80ad08455452d56aa4b953ed3a53057.tar.gz
smokeping-04e1ef4cd80ad08455452d56aa4b953ed3a53057.tar.xz
* 2.0/lib/Smokeping.pm:
+ make the address of the remote client appear in the web server's error log
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 9134612..050cb34 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -2395,6 +2395,7 @@ sub daemonize_me ($) {
sub initialize_cgilog (){
$use_cgilog = 1;
+ CGI::Carp::set_progname($0 . " [client " . ($ENV{REMOTE_ADDR}||"(unknown)") . "]");
$logging=1;
}
@@ -2571,11 +2572,12 @@ sub cgi ($) {
-expires=>'+'.($cfg->{Database}{step}).'s',
-charset=> ( $cfg->{Presentation}{charset} || 'iso-8859-15')
);
+ initialize_cgilog();
if ($q->param(-name=>'secret') && $q->param(-name=>'target') ) {
- my $ret = update_dynaddr $cfg,$q;
+ my $ret = update_dynaddr $cfg,$q;
do_cgilog($ret) if defined $ret and $ret ne "";
} else {
- display_webpage $cfg,$q;
+ display_webpage $cfg,$q;
}
}