Changeset 3408

Show
Ignore:
Timestamp:
07/02/08 16:18:35 (6 months ago)
Author:
ksprotte
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/bos/tools/squid-access-log2csv

    r3407 r3408  
    2020              (gethash uri *uri-hash*))))) 
    2121 
    22 (with-open-file (in (first ext:*args*)) 
    23   (with-loop-split (list in " \\+") 
    24     (when (= 10 (length list)) 
    25       (destructuring-bind (timestamp elapsed client action/code 
    26                                      size method uri ident 
    27                                      hierarchy/from content) 
    28           list 
    29         (declare (ignore timestamp elapsed client 
    30                          size method ident 
    31                          hierarchy/from content)) 
    32         (let ((action/code (intern action/code))) 
    33           (pushnew action/code *action/codes*) 
    34           (incf (action/code-count uri action/code)) 
    35           (incf (action/code-count uri :total))))))) 
     22(let ((line-count 0)) 
     23  (with-open-file (in (first ext:*args*)) 
     24    (with-loop-split (list in " \\+") 
     25      (when (= 10 (length list)) 
     26        (format *standard-error* "Reading log line ~D...~C" 
     27                (incf line-count) #\Return) 
     28        (destructuring-bind (timestamp elapsed client action/code 
     29                                       size method uri ident 
     30                                       hierarchy/from content) 
     31            list 
     32          (declare (ignore timestamp elapsed client 
     33                           size method ident 
     34                           hierarchy/from content)) 
     35          (let ((action/code (intern action/code))) 
     36            (pushnew action/code *action/codes*) 
     37            (incf (action/code-count uri action/code)) 
     38            (incf (action/code-count uri :total)))))))) 
    3639 
    3740