#!/star/Perl/bin/perl
$SERVERNAME="horus";
$BASEWWWURL="http://horus.roe.ac.uk/data/wsa/";
$BASECGIURL="http://horus.roe.ac.uk/wsa/";
$BASEJSPURL="http://horus.roe.ac.uk:8080/wsa/";
$BASEWWWDIR="/data/wsa/";
$WEBPROGSDIR="/home/mar/webprogs/";
$TMPWEB="/data/wsa/tmp/";
$IMCOPY=$WEBPROGSDIR."imcopy";
$ENV{'LD_LIBRARY_PATH'} = $ENV{'LD_LIBRARY_PATH'}.":/star/lib";
$HTMLDOCCMD="/home/mar/htmldoc-1.8.27/htmldoc/htmldoc ";
$SVNCMD="/usr/bin/svn";
$SVNDIR="/home/mar/svn/webpages";
$ENV{'CVSROOT'} = ":pserver:mar@cvs.roe.ac.uk:/havra2/cvs/WFAU";
$WORKDIR="/home/mar/build/wsa";
$logDir=$TMPWEB."logs/";
sub cgiLog {
    my $cgiName=$_[0];
    my $ip=$_[1];
    my $bytesSent=$_[2];
    my $extra=$_[3];
    my $err=$_[4];
    my $logString=$cgiName.",".$ip.",".$bytesSent.",".$extra.",".$err;
($sec,$min,$hour,$day,$mon,$year,$a1,$a2,$a3) = localtime (time);

$year=$year+1900;
$thisMonth= (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon];
$mon++;
$timeStamp=sprintf("%02d",$day)."/".$thisMonth."/".$year." ".sprintf("%02d",$hou
r).":".sprintf("%02d",$min).":".sprintf("%02d",$sec);
$logFile=$logDir."cgi".$year."_".sprintf("%02d",$mon)."_".sprintf("%02d",$day)."
.log";
$logString=$timeStamp.",".$logString;
open(LOGFILE, ">> $logFile") || die "cant open logfile: $!";
print LOGFILE "$logString\n";
close(LOGFILE);
} 


