This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-15
Channels
- # announcements (13)
- # beginners (106)
- # cider (70)
- # cljdoc (1)
- # cljsjs (1)
- # clojure (97)
- # clojure-finland (1)
- # clojure-italy (13)
- # clojure-mexico (16)
- # clojure-russia (1)
- # clojure-spec (53)
- # clojure-uk (146)
- # clojurescript (44)
- # core-async (5)
- # cryogen (1)
- # css (1)
- # cursive (11)
- # datomic (89)
- # duct (10)
- # emacs (4)
- # figwheel-main (58)
- # fulcro (5)
- # hispano (35)
- # hyperfiddle (1)
- # jobs (2)
- # jobs-discuss (1)
- # lambdaisland (1)
- # leiningen (3)
- # off-topic (13)
- # onyx (50)
- # parinfer (3)
- # pedestal (4)
- # reagent (9)
- # ring-swagger (56)
- # rum (3)
- # shadow-cljs (85)
- # spacemacs (4)
- # vim (4)
@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?
Just stumbled upon the docs https://github.com/duct-framework/docs/blob/master/GUIDE.rst#querying-the-database
@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