Commit 41288de2 authored by Dave Cooper's avatar Dave Cooper
Browse files

removed redundant .svn directories.

parent 98ed3335
10
dir
990
svn://svn.genworks.com/rainforest/trunk/genworks/gdl/apps/server-log
svn://svn.genworks.com/rainforest
2010-09-29T18:40:16.637689Z
26
dcooper8
a8dd3158-16c2-4b09-9e8e-1a0d18a46f2f
source
dir
10
dir
990
svn://svn.genworks.com/rainforest/trunk/genworks/gdl/apps/server-log/source
svn://svn.genworks.com/rainforest
2010-09-29T18:40:16.637689Z
26
dcooper8
a8dd3158-16c2-4b09-9e8e-1a0d18a46f2f
package.lisp
file
2011-11-01T23:13:23.459564Z
74b5a1f8a30d814211b9abe5aacf0381
2010-09-29T18:40:16.637689Z
26
dcooper8
has-props
127
file-ordering.isc
file
2011-11-01T23:13:23.459564Z
92d42a124ebbe036708c932bea978229
2010-09-29T18:40:16.637689Z
26
dcooper8
has-props
12
assembly.lisp
file
2011-11-01T23:13:23.459564Z
4c73645cc81572543732f636518487d3
2010-09-29T18:40:16.637689Z
26
dcooper8
has-props
3215
publish.lisp
file
2011-11-01T23:13:23.459564Z
345182a4bfb7efc8642df1c1037f5cb6
2010-09-29T18:40:16.637689Z
26
dcooper8
has-props
392
(in-package :aserve-log)
(define-object assembly (base-html-sheet)
:input-slots
((relevant-headings (list :domain :iso-time :uri-path :user-agent :referrer))
(relevant-hosts (list "www.genworks.com" "www.squeakymail.com")))
:functions
((write-html-sheet
()
(html
(:html
(:head (:title "Log Report"))
(:body (:center (:h2 "Log Report"))
(:p (the (:write-log-table)))))))
(:pass-filter?
(log &key relevant-hosts)
;;
;; FLAG -- make more general and configurable.
;;
(let ((domain (getf log :domain))
(uri-path (getf log :uri-path))
(user-agent (getf log :user-agent)))
(and (or (null relevant-hosts)
(member (getf log :uri-host) relevant-hosts :test #'string-equal))
(or (null user-agent)
(not (or (search "usabestnet" domain)
(search "c-68-40-98-13.hsd1.mi.comcast.net" domain)
(search "msnbot.msn.com" domain)
(search "netsonic.fi" domain)
(search "amiedu.fi" domain)
(search "looksmart" domain)
(search "buildrack" domain)
(search "wwnet.net" domain)
(search "internetseer.net" domain)
(search "googlebot.com" domain)
(search "inktomi" domain)
(search "echo.com" domain)
(search "netcraft.com" domain)
(search "spider" domain)
(string-equal uri-path "/robots.txt")
(string-equal uri-path "/server-log")
(search ".gif" uri-path)
(search ".jpg" uri-path)
(search "formmail" uri-path)
(string-equal user-agent "ia_archiver")
(search "Gozilla" user-agent)
(search "raw.no-ip.com/monitor" user-agent)
(search "grub" user-agent)
(search "Sleuth" user-agent)
(search "Ask Jeeves" user-agent)
(search "crawler" (string-downcase user-agent))
(search "robot" (string-downcase user-agent))
(search "LinkScan" user-agent)
(search "sitecheck.internetseer.com" user-agent)
(search "Googlebot" user-agent)))))))
(:write-log-table
()
(let* ((log-entries (progn (clear-log-buffer) *log-report-buffer*))
(latest-time (getf (first log-entries) :time))
(cut-off-time (- latest-time (* 5 24 60 60)))
(relevant-hosts (the :relevant-hosts))
(entry-hash (make-hash-table :size (length (the :relevant-headings)))))
(html
((:table :bgcolor :black :cellspacing 1 :cellpadding 2)
((:tr :bgcolor :yellow)
(dolist (heading (the :relevant-headings))
(html (:td (:princ (replace-substring (string-capitalize heading) "-" " "))))))
(dolist (log log-entries)
(when (and (> (getf log :time) cut-off-time)
(the (:pass-filter? log :relevant-hosts relevant-hosts)))
(html ((:tr :bgcolor (gethash :quartz *color-table*))
(dolist (heading (the :relevant-headings))
(let* ((value (getf log heading))
(hashed-value (gethash heading entry-hash)))
(if (not (equalp value hashed-value))
(progn (setf (gethash heading entry-hash) value)
(case heading
(:uri-path (html (:td ((:a :href (format nil "~(~a~)://~a~a"
(getf log :uri-scheme) (getf log :uri-host) value))
(:princ value)))))
(otherwise (html (:td (:princ value))))))
(html ((:td :bgcolor (gethash :aquamarine *color-table*)) :br)))))))))))))))
;; -*- mode: common-lisp; package: aserve-log -*-
(in-package :user)
(gwl:define-package :aserve-log (:export #:assembly))
(in-package :aserve-log)
(with-all-servers (server)
(publish :path "/iiug-log"
:server server
:function #'(lambda(req ent)
(gwl-make-part req ent "aserve-log:assembly"
:make-object-args (list :relevant-hosts (list "www.iiug.com")))))
(publish :path "/server-log"
:server server
:function #'(lambda(req ent)
(gwl-make-part req ent "aserve-log:assembly"))))
10
dir
803
svn://svn.genworks.com/rainforest/branches/1581/gdl/translators/xml
svn://svn.genworks.com/rainforest
2010-09-29T18:40:16.637689Z
26
dcooper8
a8dd3158-16c2-4b09-9e8e-1a0d18a46f2f
source
dir
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment