From af9e423f0b7b198dd53870ca35742d6485493f0b Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 27 Nov 2015 11:51:48 +0100 Subject: [PATCH] Fix errors counting, see #313. It came pretty obvious that the error counting was broken, it happens that I forgot to pass the information down to the state handling parts of the code. In passing improve and fix CSV parse errors counting and fatal errors reporting. --- src/sources/csv/csv.lisp | 3 ++- src/utils/monitor.lisp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sources/csv/csv.lisp b/src/sources/csv/csv.lisp index a2345c8..19446dd 100644 --- a/src/sources/csv/csv.lisp +++ b/src/sources/csv/csv.lisp @@ -71,6 +71,7 @@ (handler-bind ((cl-csv:csv-parse-error #'(lambda (c) (log-message :error "~a" c) + (update-stats :data (target csv) :errs 1) (cl-csv::continue)))) (cl-csv:read-csv stream :row-fn process-fn @@ -84,6 +85,6 @@ :newline (csv-newline csv))) (condition (e) (progn - (log-message :error "~a" e) + (log-message :fatal "~a" e) (update-stats :data (target csv) :errs 1))))) diff --git a/src/utils/monitor.lisp b/src/utils/monitor.lisp index 5564d3f..0162aa5 100644 --- a/src/utils/monitor.lisp +++ b/src/utils/monitor.lisp @@ -220,6 +220,7 @@ :read (update-stats-read event) :rows (update-stats-rows event) :secs (update-stats-secs event) + :errs (update-stats-errs event) :rs (update-stats-rs event) :ws (update-stats-ws event)))