[bknr-cvs] ksprotte changed trunk/projects/bos/tools/squid-access-log2csv

BKNR Commits bknr at bknr.net
Wed Jul 2 14:18:35 UTC 2008


Revision: 3408
Author: ksprotte
URL: http://bknr.net/trac/changeset/3408

squid-access-log2csv be a bit more verbose...

U   trunk/projects/bos/tools/squid-access-log2csv

Modified: trunk/projects/bos/tools/squid-access-log2csv
===================================================================
--- trunk/projects/bos/tools/squid-access-log2csv	2008-07-02 14:08:27 UTC (rev 3407)
+++ trunk/projects/bos/tools/squid-access-log2csv	2008-07-02 14:18:35 UTC (rev 3408)
@@ -19,20 +19,23 @@
         (push (cons action/code count)
               (gethash uri *uri-hash*)))))
 
-(with-open-file (in (first ext:*args*))
-  (with-loop-split (list in " \\+")
-    (when (= 10 (length list))
-      (destructuring-bind (timestamp elapsed client action/code
-                                     size method uri ident
-                                     hierarchy/from content)
-          list
-        (declare (ignore timestamp elapsed client
-                         size method ident
-                         hierarchy/from content))
-        (let ((action/code (intern action/code)))
-          (pushnew action/code *action/codes*)
-          (incf (action/code-count uri action/code))
-          (incf (action/code-count uri :total)))))))
+(let ((line-count 0))
+  (with-open-file (in (first ext:*args*))
+    (with-loop-split (list in " \\+")
+      (when (= 10 (length list))
+        (format *standard-error* "Reading log line ~D...~C"
+                (incf line-count) #\Return)
+        (destructuring-bind (timestamp elapsed client action/code
+                                       size method uri ident
+                                       hierarchy/from content)
+            list
+          (declare (ignore timestamp elapsed client
+                           size method ident
+                           hierarchy/from content))
+          (let ((action/code (intern action/code)))
+            (pushnew action/code *action/codes*)
+            (incf (action/code-count uri action/code))
+            (incf (action/code-count uri :total))))))))
 
 
 




More information about the Bknr-cvs mailing list