summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-10-03 08:06:56 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-10-03 08:06:56 +0200
commit91de9bbc5a2d7b1d7732ffe6b9cc49874a923f50 (patch)
treec152b9c22fd407b8f57be747f7f75a5b260140ac
parentcd89fc433f64fbbf1190373096271522e1b0cc0b (diff)
downloadcuirass-91de9bbc5a2d7b1d7732ffe6b9cc49874a923f50.tar
cuirass-91de9bbc5a2d7b1d7732ffe6b9cc49874a923f50.tar.gz
Add date to SQL queries log file.
* src/cuirass/logging.scm (log-query): Add date.
-rw-r--r--src/cuirass/logging.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cuirass/logging.scm b/src/cuirass/logging.scm
index 97eb6f7..3982ef2 100644
--- a/src/cuirass/logging.scm
+++ b/src/cuirass/logging.scm
@@ -84,7 +84,14 @@
(make-parameter #f))
(define (log-query query time)
- (format (query-logging-port) "~a ~,2f~%"
+ (define now
+ (current-time time-utc))
+
+ (define date
+ (date->string (time-utc->date now) "~5"))
+
+ (format (query-logging-port) "~a ~a ~,2f~%"
+ date
(string-join
(string-tokenize query
(char-set-complement