Skip to content

Commit afb3818

Browse files
adding client version to log
1 parent e539cc9 commit afb3818

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

models/admin.lisp

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@
2323
(let ((log-html (with-output-to-string (s)
2424
(loop for entry across logs do
2525
(let* ((log-data (gethash "data" entry))
26-
(url (gethash "url" log-data)))
26+
(url (gethash "url" log-data))
27+
(url (if (string= url "")
28+
"unknown"
29+
url)))
2730
(format s "
2831
<li>
2932
<div class=\"summary\">
3033
<span class=\"count\">~a</span>
3134
<span class=\"id\">~a</span>
35+
<span class=\"version\">~a</span>
3236
<span class=\"file\">~a:~a</span>
3337
</div>
3438
<div class=\"expanded\">
@@ -37,6 +41,7 @@
3741
</li>"
3842
(round (gethash "c" entry))
3943
(gethash "id" entry)
44+
(gethash "version" log-data)
4045
url
4146
(gethash "line" log-data)
4247
(gethash "msg" log-data)))))))

models/log.lisp

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
(defun hash-log (log-data)
44
"Generate a hash for this log from its data. Used to de-dupe log records."
5-
(md5 (concatenate 'string (gethash "msg" log-data) (gethash "url" log-data) (gethash "line" log-data))))
5+
(md5 (concatenate
6+
'string
7+
(gethash "msg" log-data)
8+
(gethash "url" log-data)
9+
(gethash "line" log-data)
10+
(gethash "version" log-data))))
611

712
(defafun get-logs (future) (num-entries)
813
"Get N log entries. Please never add a controller interface to this without

0 commit comments

Comments
 (0)