Fork me on GitHub

@myguidingstar Thanks! I've solved that problem now by putting args from (-main) in a global var, maybe not a good idea but at least it works now. I have another issue still when using the CLI handler to connect to a database to do some work, a lot of SQL statements would be printed out in the console, this is totally fine when running the web app in production, but I want basically no console output from logs when accessing from my CLI application. I've tried setting a different database connection with a different logger:

[:duct.logger.timbre/spit :my-app.logger.cli/spit] {:fname "logs/cli.log"}
 [:duct.logger/timbre :m-app.logger/cli]            {:appenders {:duct.logger.timbre/spit #ig/ref :my-app.logger.cli/spit}}

[:duct.database.sql/hikaricp :my-app.database/cli] {:jdbc-url                  #duct/env "DB_URL"
                                                    :logger                    #ig/ref :m-app.logger/cli
                                                    :zero-date-time-behavior   "convertToNull"
                                                    :use-unicode               true
                                                    :character-encoding        "UTF-8"
                                                    :use-legacy-date-time-code false}
Turned out that it would be changing the default logger behavior too. Not sure why.


This might be a silly question, but how would I get a configured boundary at the repl?


Say the db boundary for instance


@scaturr you should be able to instantiate the record (def db (duct.database.sql/->Boundary <spec>)), and then use it with whatever boundary protocol you’ve defined


assuming you’ve extended the protocol for the duct.database.sql.Boundary type


I was able to use the following:

(defn db []
  (-> system (ig/find-derived-1 :duct.database/sql) val))


In the dev namespace


Thank you for the response 🙂