 (defn- log-error
   "Log a error."
   [error path stats-errors]
-  (clog/error (format "Path store error: %s, path: %s" error path) error))
+  (clog/error (format "Path store error: path: %s, error: %s" path error) error)
+  (swap! stats-errors inc))
 
 (defn- wildcards-to-regexp
   "Convert Graphite wildcards to a regular expression."

    (log/trace (str "ES search respond: " resp))
    (map #(:_source %) (scroll-fn resp))))

(defn elasticsearch-path-store
  "Create an Elasticsearch path store."
  [url options]

                                                 limit-depth path))]
            (log/trace (str "ES delete query: " query))
            (if run
              (let [response (delete-fn query)]
                (process-response-delete response index path stats-errors))))
          (catch Exception e
            (log-error e path stats-errors))))
      (get-stats [this]
