kwrooijen / gungnir

A fully featured, data-driven database library for Clojure.

Home Page:https://kwrooijen.github.io/gungnir/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Printing honeysql form causes perf issues

Ramblurr opened this issue · comments

When an exception is caught, gungnir is printing the honeysql form. Ref this line

(println (honey->sql form))

This is bad for a few reasons:

  1. It pollutes the stdout of the program
  2. If the SQL query is very long (inserting a lot of data), then it can lock up the dev's REPL.

#2 is actually how I discovered this, an exception during a big insert was locking up my emacs repl.

The best solution is probably to use clojure.tools.logging and use the "debug" handler. That way clients can enable/disable gungnir logs as they see fit.