]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Disable logging
authorhadeshyp <hadeshyp>
Sun, 4 Nov 2012 21:37:35 +0000 (21:37 +0000)
committerhadeshyp <hadeshyp>
Sun, 4 Nov 2012 21:37:35 +0000 (21:37 +0000)
cts/httpi

index 6f60477918e6b3d2e5b47da0c74a4ef029782517..6c52d6986dae13b07ccd97403dd17b794bec0342 100755 (executable)
--- a/cts/httpi
+++ b/cts/httpi
@@ -80,7 +80,8 @@ $VERSION = "1.7 (Demonic/Linux)";
 
         "bin" => "application/octet-stream");
 
-$logfile = "./htdocs/access.log";
+# comment in to enable logs
+#$logfile = "./htdocs/access.log";
 $path = "./htdocs";
 $sockaddr = 'S n a4 x8';
 
@@ -163,7 +164,7 @@ sub htcontent {
 }
 
 sub log {
-       if (open(J, ">>$logfile")) {
+       if ($logfile && open(J, ">>$logfile")) {
                my $q = $address . (($variables) ? "?$variables" : "");
                $contentlength += 0;
                $contentlength = 0 if ($method eq 'HEAD');