Fork me on GitHub
#sql
<
2022-03-09
>
Eugen10:03:56

any hints on how I could activate jdbc logging for postgres? https://jdbc.postgresql.org/documentation/head/logging.html#conprop ?

(let [db {:dbtype "postgres"
            :auto-commit false
            :loggerLevel "DEBUG"}]
    (with-open [^HikariDataSource ds (connection/->pool HikariDataSource db)
                writer (io/writer out)]
      (.close (jdbc/get-connection ds)) ;; validate connection
)
Also tried the jdbcUrl version and I don't see any logs. I am using timbre logging and added both slf4j->timbre and jul-slf4j libraries