From cf6182fafac597df80f5485a4fe4e471fa266c36 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 7 Jul 2017 02:34:23 +0200 Subject: [PATCH] Add a notice message with guessed parameters. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We might have to help users debug our decision, and I expect we will have to improve our guess “engine” here. --- src/sources/csv/csv.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sources/csv/csv.lisp b/src/sources/csv/csv.lisp index 9f73d9d..1cbabf0 100644 --- a/src/sources/csv/csv.lisp +++ b/src/sources/csv/csv.lisp @@ -86,7 +86,14 @@ (guess-csv-params stream nb-columns) (setf separator sep quote q - escape esc)))) + escape esc) + + (log-message :notice "Guessed following CSV parameters:~% ~a" + (format nil "~ + fields terminated by '~a', + fields optionally enclosed by '~a', + fields escaped by '~a'" + sep q esc))))) (handler-case (handler-bind ((cl-csv:csv-parse-error