Skip to content

Instantly share code, notes, and snippets.

@dainiusjocas
Created July 1, 2015 09:25
Show Gist options
  • Save dainiusjocas/5ef737e620b702526023 to your computer and use it in GitHub Desktop.
Save dainiusjocas/5ef737e620b702526023 to your computer and use it in GitHub Desktop.
clojure-liquibase-logging-level
(defn- get-liquibase
"Creates Liquibase instance for given connection and sets logging level."
[connection]
(let [liq-conn (JdbcConnection. connection)
liq-db-factory (DatabaseFactory/getInstance)
liq-database (.findCorrectDatabaseImplementation liq-db-factory liq-conn)]
(.setLogLevel (LogFactory/getLogger) (LogLevel/SEVERE))
(Liquibase. "db/changelog.xml" (ClassLoaderResourceAccessor.) liq-database)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment