https://www.mediawiki.org/wiki/Special:Code/MediaWiki/115171

Revision: 115171
Author:   a_engels
Date:     2012-05-09 19:42:19 +0000 (Wed, 09 May 2012)
Log Message:
-----------
I was a bit too fast in my last commit

Modified Paths:
--------------
    trunk/wikistats/squids/SquidCountArchiveConfig.pm
    trunk/wikistats/squids/SquidCountArchiveProcessLogRecord.pm
    trunk/wikistats/squids/SquidCountArchiveReadInput.pm

Modified: trunk/wikistats/squids/SquidCountArchiveConfig.pm
===================================================================
--- trunk/wikistats/squids/SquidCountArchiveConfig.pm   2012-05-09 17:48:10 UTC 
(rev 115170)
+++ trunk/wikistats/squids/SquidCountArchiveConfig.pm   2012-05-09 19:42:19 UTC 
(rev 115171)
@@ -2,7 +2,6 @@
 
   $developer = "engels" ;
   $cfg_liblocation = "/a/squid/stats/dev_$developer/scripts" ;
-  $cfg_logdir = "/a/squid/stats/dev_$developer/scripts" ;
 
   $cfg_path_root_production = "/a/squid/stats/dev_$developer/csv" ; 
   $cfg_path_root_test       = "w:/! perl/squids/archive/test" ;  # Erik

Modified: trunk/wikistats/squids/SquidCountArchiveProcessLogRecord.pm
===================================================================
--- trunk/wikistats/squids/SquidCountArchiveProcessLogRecord.pm 2012-05-09 
17:48:10 UTC (rev 115170)
+++ trunk/wikistats/squids/SquidCountArchiveProcessLogRecord.pm 2012-05-09 
19:42:19 UTC (rev 115171)
@@ -130,7 +130,7 @@
     $country = $fields [14] ;
     if (($country eq "") || ($country =~ /null/))
     { $country = "--" ; }
-    if (&isInternal($client_ip))
+    if (&IsInternal($client_ip))
     { $country = "-X" ; }
   }
   else
@@ -1408,7 +1408,6 @@
   {
     chomp $line ;
     push( @mobile_devices, $line ) ;
-    print "Found mobile device $line\n" ;
   }
   close CSV_MOBILE_DEVICES ;
 }

Modified: trunk/wikistats/squids/SquidCountArchiveReadInput.pm
===================================================================
--- trunk/wikistats/squids/SquidCountArchiveReadInput.pm        2012-05-09 
17:48:10 UTC (rev 115170)
+++ trunk/wikistats/squids/SquidCountArchiveReadInput.pm        2012-05-09 
19:42:19 UTC (rev 115171)
@@ -6,8 +6,6 @@
 # refresh: bayes:/usr/share/GeoIP> wget 
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
 use SquidCountArchiveConfig ;
 
-open "FILE_LOG", ">>", "$cfg_logdir/countproblems.log" || abort ("Log file 
'$file_log' could not be opened.") ;
-
 sub CollectFilesToProcess
 {
   trace CollectFilesToProcess ;
@@ -152,6 +150,7 @@
     my $file_csv_views_viz2 = $file_csv_views_viz ;
     my $date = substr ($time_to_start,0,4) . substr ($time_to_start,5,2) . 
substr ($time_to_start,8,2) ;
     $file_csv_views_viz2 =~ s/date/$date/ ;
+    print $file_csv_views_viz2 ;
     $gz_csv_views_viz = gzopen ($file_csv_views_viz2, "wb") || die "Unable to 
write $file_csv_views_viz2 $!\n" ;
 
     $comment = "# Data from $time_to_start till $time_to_stop 
(yyyy-mm-ddThh:mm:ss) - all counts in thousands due to sample rate of log (1 = 
1000)\n" ;
@@ -242,7 +241,6 @@
         $fields_too_few  ++ ;
         print "invalid field count " . $#fields . "\n" ;
         print ERR $#fields . " fields: \"$line\"\n" ;
-        &Log ("Short line: $line\n") ;
         next ;
       }
 
@@ -252,7 +250,6 @@
         $fields_too_many ++ ;
         print "invalid field count " . $#fields . "\n" ;
         print ERR $#fields . " fields: \"$line\"\n" ;
-        &Log ("Long line: $line\n") ;
         next ;
       }
 
@@ -455,10 +452,4 @@
   return ($time) ;
 }
 
-sub Log
-{
-  $msg = shift ;
-  print $msg ;
-  print FILE_LOG $msg ;
-}
 1;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to