From 91de9bbc5a2d7b1d7732ffe6b9cc49874a923f50 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 3 Oct 2020 08:06:56 +0200 Subject: Add date to SQL queries log file. * src/cuirass/logging.scm (log-query): Add date. --- src/cuirass/logging.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3